Prefetching Javascript and CSS
Prefetching javascript and CSS files can improve the page load times as users navigate your site. This creates a better user experience and may even improve your search engine rankings.
I’ll describe an easy prefetch technique useful in situations in which you are reasonably sure the user will navigate from Page A to Page B. This situation typically involves the user filling out a form. Chances are high that if a user begins to fill out a form, she will eventually submit it, arriving at Page B. If you prefetch resources that will be needed by Page B, it’ll load faster when the user navigates to it. This is a technique I’m using on our lifespan test.
Using Amazon’s Cloudfront to host static files
The major players online use CDNs–Content Delivery Networks–to serve their static files, such as images, CSS and javascript files. CDNs have edge locations scattered around the world, so that when a user in Japan (for example) visits your page, he’ll be served all the static content from a server in Tokyo, even though your main web server may be located in the US.
In recent years, a number of CDNs have emerged that can affordably serve content for web sites that don’t have million dollar budgets. Amazon’s Cloudfront service is probably the cheapest, most accessible such CDN. Read more