Google Chrome Improves JavaScript Speeds Again

One of the old rules of optimizing website load times for all browsers was that the browser didn’t begin to parse the downloaded JavaScript until each file was downloaded. Starting with Chrome 41, Google has announced that this is no longer the case .

In this announcement, Google has said that new versions of Chrome will begin parsing JavaScript as it is downloaded to the browser, even before the particular file’s download is complete. However, in order to see this happen more quickly, you must utilize the async or deferred tags in the <script> tag. JavaScript that is loaded without async or deferred is still a completely blocking action that pauses all rendering while downloading and parsing the JavaScript files. According to Google, this can improve website load time by up to 10%.

In addition, Chrome will now keep a copy of the parsed JavaScript in its cache for future use on additional visits to the same page. While this will improve secondary load times on a page, it sounds like it will not improve page load times when the same script file is loaded across multiple pages on the site. We can only hope that Google is able to add that functionality to Chrome, which should definitely make a significant difference in page load times.

comments powered by Disqus

Related Posts

Defensive Development - Fail Fast or Go Home

Defensive Development is a programming practice that is frequently misunderstood, but is nevertheless a critical practice to follow when working in many environments. I have seen articles written that argue that defensive development simply causes nonsensical null checks to be written, and as a result of seeing people writing bad code defensively, argues that no one should practice defensive development. There are other articles that, like many things in software development, argue that you should always use defensive development for everything.

Read More

Why Use AddThis.com Sharing Buttons

AddThis.com produces a bit of JavaScript that enables website owners to quickly and easily add social sharing buttons/links to their website. In addition to allowing users to easily share your content socially, they also provide analytics information about what content is shared via which method, giving a greater insight into visitor behavior. However, just because it provides these benefits to websites does not necessarily mean that it is a good tool to implement on your website.

Read More

Google Code Shutting Down

Google just recently announced that they are going to begin the process of shutting down their Google Code project hosting service. In the blog post announcing that they were shuttering the service, they let it slip that even Google had quit using Google Code for their project hosting, instead transitioning thousands of their projects to GitHub. Google seemingly blames the fact that GitHub and BitBucket handle project hosting better than Google does as the main reason that they are discontinuing the service.

Read More