Speed Up Your Web Pages By PreLoading, Caching…
Speed Up Your Web Pages By PreLoading, Caching…
In this article, I will explain several techniques which can be applied to any website irrespective of the development language.
1) If possible put all your static content like javascript, css and images on a seperate domain. This way you can speedup as the browsers can download content in parallel.
2) Minify your js and css.
3) Set ETags, and set expiration date to a furture date for all your static content as this would enable the browser to cache the resources.
4) Compress and serve the static content.
5) Cache your Ajax data.
6) Reduce number of round trips.
Now let us discuss a technique by which you can load the resources in the background.
You can have a javascript function which gets called afterthe page is loaded. And in this javascript function you can load other resources in the background.
Now let us discuss another technique called pre-loading. Though this may not be the scenario in every case. Lets assume we have a certain scenario in which you would redirect a user to a certain page which needs a lot of js, images, css. You can insert a hidden iframe with all these resources and dont forget to have this iframe at the end of the page, so that the page is displayed and meanwhile these resources are loaded.
In a future article lets see some code examples of these techniques - loading in background and pre loading.
And may be in a series of future articles let us discuss how to improve performance of ASP.Net applications.
Till then have fun.
Update:
Part - 2 has been posted at Speed Up Your Website By PreLoading - Example Included
Speed Up Your Web Pages By PreLoading, Caching…
Tags: Web
August 22nd, 2008 at 11:29 am
[...] .Net Mostly .Net « Speed Up Your Web Pages By PreLoading, Caching… [...]
August 23rd, 2008 at 9:38 am
[...] This article is a continuation to an article titled: Speed Up Your Web Pages By PreLoading, Caching… [...]