Mar
19
htaccess gzip for Faster Loading and Bandwidth Saving
March 19, 2008 |
If you can use htaccess on your server and want to use gzip for faster Page Load Times / Bandwidth Saver. You can put the following lines in the htaccess file on your server:
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
This basically checks to see if mod_czip.c is found and if it is it will compress the files for you so they are faster to send to the browser. This supposedly speeds it up 35-40%. Then file sized supposedly go down 55-65%.
Similar Posts
- htaccess Explicitly Define Default Index File
- Deny Access to inc Files Using htaccess
- Create Custom Error Pages Using htaccess PHP
- Use htaccess to Fake Different File Extension
- Use htaccess to Deny Access Directory Listing
- Force Files Like PDF Download using htaccess
- htaccess Require the www For Domain URL
- Set Local Timezone Using htaccess
- Use htaccess for 404 Redirect
- Use htaccess to Deny Access to hidden Files
- Apache htaccess Prevent Users from Uploading and Executing Files
- Google Text Translation Using htaccess
- htaccess Permanently redirect file or directory
- Block people from Certain URL Using htaccess
- htaccess Limit the Number of Concurrent Visitors to your Website
- htaccess Deny Diractory Access During a Specific Time
- htaccess Remove the www From Domain URL
- Block IPs Using htaccess
- Use htaccess with Site Maintenance Page
- Remove File Extension Using htaccess
- htaccess Conditional Loop Redirect
Comments
2 Comments so far



































[...] are based on .htaccess (Hypertext Access) Articles from AskApache. mod_gzip settings are taken from Highub - Web Development Blog. addthis_url = [...]
[...] Some descriptions are based on .htaccess (Hypertext Access) Articles from AskApache. mod_gzip settings are taken from Highub - Web Development Blog. [...]