0
votes
2answers
44 views

Dynamically load CSS

I'm using LESS for creating CSS and I'm considering using something like grunt-render on the server side in order to only load the CSS / JS that is needed for that page. My goal is to reduce overhead ...
0
votes
1answer
44 views

Declaring variables using single or multiple var statements. Performance wise [closed]

Someone once told me that it's better for Javascript performance to use one var statement rather then multiple. I.e. // Version A. Allegedly Faster var a = 1, b = 2, c = 3; // Version B. ...
0
votes
1answer
307 views

Can I defer loading Modernizr?

I'm using an HTML5 template that makes thorough use of the semantic tags and includes Modernizr up top to do the necessary IE coaxing. Google PageSpeed is complaining about the blocking JavaScript and ...
0
votes
1answer
563 views

Parallel downloading of JavaScript files on page load

Below is a quote from one of the Yahoo performance pages: While a script is downloading, however, the browser won't start any other downloads, even on different hostnames. When I look at page ...
4
votes
2answers
216 views

Adding Google +1 Button Slows Page Load Time

This article says Google +1 tags can add a second to page load time, which means a 10% decline in visitors. The article authors say they use smart tag loading to reduce page load time. Does anyone ...
11
votes
1answer
378 views

When and when not to use a CDN

I'm working on a web-application that loads a couple of small gif images onto the screen. I'm using a relative path, which means they are loaded from the same web server that serves the php page. The ...
3
votes
2answers
703 views

One JS/CSS bundle Vs. One with default and one with custom

On a few of my sites, we use Javascript/CSS bundles to reduce load time. I've always used two bundles for each type (4 in total) so I have JS Bundle 1: Contains scripts that are standard on every ...
11
votes
5answers
277 views

Should JavaScript referenced in the head section be served from the same hostname as the main document?

I was under the impression that for the best performance, Javascript should be treated as static content and served from a cookieless domain along with CSS files, images, etc. But Google says here: ...
23
votes
5answers
686 views

How can I reduce the costs of loading large JS libraries?

If I am using a large Javascript library for my page, how can I make sure that this does not impair the user's use of the site?
25
votes
4answers
3k views

Does “putting Javascript at the bottom” defeat the purpose of document.ready?

I know that it is recommended to put Javascript at the bottom of the page, but if I'm using jQuery doesn't this defeat its purpose to run as the DOM is loading? If I have a dropdown menu, for ...
14
votes
5answers
2k views

What's the best way to load Javascript into a page to optimize performance?

Is there a way to load my JavaScript into a page that will make it load faster?