A simpler alternative

Posted by Kromey at 7:28pm Nov 21 '09
You must sign in to send Kromey a message
is to simply combine+minify all your JS and CSS files ahead of time. The main disadvantage here is that if you have some JS or CSS that's maybe used only once in a single location buried deep within your site (i.e. not frequently visited) gets loaded with every page. However, the impact of this is usually mitigated if you properly configure caching controls on your server - the user downloads the single JS or CSS file once, and then never again.

Also, by minify-ing the files, you reduce the amount of data that gets downloaded to begin with.

Now, the first visit to your site (on an un-primed cache) generates a single request for each of the JS and CSS files, and subsequent visits (now that we've primed the cache) do not make any requests for JS or CSS, thereby significantly reducing server load for you and page load time for your visitors.

Below are the public posts you may view:

You currently have read-only access to this board. You must request an account to join the conversation.

Why Join 4thKingdom?

Note that there are no ads here. Just intelligent and friendly conversation. We keep the spam out, the trolls out, the advertisers out… 4K is just a low-key, old-fashioned site with members from around the world.
This community began in 1998, and we continue to accept new members today.

Hot Discussion Topics: