O'Reilly logo

Instant PageSpeed Optimization by Sanjeev Jaiswal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an Expires or Cache-Control header (Simple)

Websites usually contain the mixture of static and dynamic elements that are being used uniformly over different pages. When a browser starts loading a web page, it usually downloads all the images, CSS files, JavaScript files, and Flash files, if any. Imagine if every time the browser had to download each and every file associated with that page, how hectic it would be for both the browser and the user, and you would have a bandwidth problem too. Gone are the days when people used few static pages with less creativity. Now, almost all websites contain a lot of JavaScript and CSS scripts; images that make the site a bit slower and heavy.

Getting ready

We can load a web page faster if we cache the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required