Thursday, January 19, 2012

When you source a styling sheet or a javascript library, does the web page load everything?

For example, if I source a jQuery library, is the webpage going to load everything off the library and as a result, actually increase the loading time for my webpage?When you source a styling sheet or a javascript library, does the web page load everything?
Yes, unless the user's browser caches the file, which most do by default. (The server from which jQuery is served also has to send the proper response headers so that the client knows the file hasn't changed, but that may not be under your control.)



If you want to see exactly how expensive loading jQuery is, use the FireBug plugin for Firefox. It can show you how much time each file takes to download and display.

No comments:

Post a Comment