![]() |
![]() |
![]() |
Popular content
Today's:
All time:
Last viewed:
- e-Commerce Validated SSL Certificates
- CRE Loaded Templates are now available from StrikeHawk eCommerce, Inc.
- Comodo EV SGC SSL Certificates starting at $538/yr with free EV Enhancer to convert sales and prevent cart abandonment
- CRE Loaded V6.2.13 USPS Postal Service upgrade module
- CRE Loaded Hosting starting at $9.95/mo
CRE Loaded Cart Compression and Optimization
CRE Loaded gzip Compression Settings
CRE Loaded cart includes built in compression for catalog pages. Seen in this exhibit, login to administration. Next, come down to settings and select compression. We recommend you do not compress administration pages.But, what other things can you do?
Seasoned CRE Loaded support technician, inetbiz, produced a linux/apache htaccess file which will call up several features should your host enabled them. Some of those apache modules are listed below. They tell the apache webserver how to handle content in linux. We've included a download of the htaccess source for your convienence. Use as-is and modify to your preferences.
mod_deflate for CRE Loaded Cart
The first section is mod_deflate using the apache command:
<IfModule>
# Insert mod_deflate filter
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
no-gzip dont-vary
# Don't compress binaries
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
# BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
What it's telling the web server is to look for all files that are javascript and cascading stylesheets for the cart and theme and "zip" them up to send to the browser. You're browser then inflates them back to normal size and stores it in your internet temporary files.
mod_expires for CRE Loaded Cart
The next section tells Apache to evaluate the mime-type of the file and set the expiration time using time format for mod_expires. A for accessed and the number of seconds into the future. So here is the expire directives we used. Notice that we only used 600 seconds after the accessed time for html documents? This allows the customer to check for newer version not more than ten minutes.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 30 days"
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript "access plus 30 days"
ExpiresByType text/css "access plus 60 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType text/plain "access plus 30 days"
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A2419200
ExpiresByType text/html "access plus 1 days"
</IfModule>
mod_headers for CRE Loaded Cart
The last section sends control data to the browser ahead of the content to tell the browser how it should store the files in your browser's temporary file storage.
<IfModule mod_headers.c> # 3 Month <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$"> Header set Cache-Control "max-age=7257600" </FilesMatch> # 1 Week <FilesMatch "\.(js|css|pdf|txt)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # 10 Minutes <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=600" </FilesMatch> # NONE <FilesMatch "\.(pl|php|cgi|spl)$"> Header unset Cache-Control Header unset Expires Header unset Last-Modified FileETag None Header unset Pragma </FilesMatch>
That's it! You're all done. Download the attachment and edit. Upload to your stores beginning folder and you should notice an increase in loading speed after the first vist to your website.
| Attachment | Size |
|---|---|
| cre_enhance_htaccess.txt | 2.56 KB |
- inetbizo's blog
- Login to post comments
- 780 reads



