3
votes
1answer
18 views

What are the effects on loading times when conditionally loading and concatenating scripts?

Suppose you have a script in your theme that you always need on every page - say 'animate-menu.js' (10KB) - and you have one that you only need on one specific page - say 'validate-contactform.js' ...
0
votes
3answers
69 views

InstantClick effect on SEO?

InstantClick.io is a pretty awesome JS library that makes a website feel a lot faster (in most cases) by prefetching links when a user is hovering above them. This will cut off at least about 100ms ...
0
votes
2answers
50 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
61 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
467 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
605 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
217 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
396 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
772 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
278 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
729 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
4k 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?