A Smarter Way to Include JavaScripts and CSS to Reduce Page Load Times
Updated my open source project SmartInclude which handles runtime compression and minifying javascript and stylesheet.
The project have been constructed to be:
- Powerful - use well proven compressors from YUI together with automatic GZip to further decrease the file transfer.
- Easy to use - just replace your script-tags with a custom webcontrol to implement in your project.
- Easy to develop with - set a single property in your web.config to disable the compression to help debugging scripts.
The main idea is to have all scripts and css-files in a readible form on the server and compile them to one compressed and minified file when transfered to the visitor in order to decrease bandwidth and most important of all: load time of the page.
The compressed file is cached client side with a hash stamp that makes the web browser request a new file if it has changed since last request from the server.
Take a look at the article describing the project:
SmartInclude article and code at CodeProject
You can always find the latest code over at smartinclude.codeplex.com.
Related posts: