Some simple steps to reduce CS-Cart page load times.
- Optimization references
- Best Practices for Speeding Up Your Web Site – Yahoo
- Optimize caching – Google
- Increasing Application Performance with HTTP Cache Headers – heroku
- Speed Up Sites with htaccess Caching – Ask Apache
- Image optimization tools
- PNGGauntlet (Win) or ImageOptim (Mac)
- Test your website with a speed analyzer
- http://gtmetrix.com – Online speed analyzer
- YSlow – Website performance browser extension
- Backup your .htaccess file (located in the root of your CS-Cart install)
- Edit your .htaccess file
- Below the default CS-Cart code in your .htaccess file add rules for
- ETag – disable so we can control with Expires
- Expires – Set so browser caches
- Compression – compress to optimize
Example code that I’ve used to move my site from an 81 “B” YSlowscore to a 92 “A” score.
## -- Optimization -- ##
# Turn on Expires and set default to 0
# Disable ETag - force browsers to rely on your expires settings for caching
Header unset ETag
# Set up caching on commonly updated files for 1 Month (far future)
# Set up caching on media files for 1 year
Header append Cache-Control "public"
#Gzip - compress it!
Before and After YSlow test results from the above code – click to enlarge
Would this work with the latest version 4.9.3?
Can you help me please apply to my site what you wrote above?
Unfortunately I can handle it!
When adding the code above to my .htaccess file I get the following error.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Please try again Ezra, the code was displaying improperly.
wow !!!!!!!! you are a genius!!!! you saved me. I spent a lot of time optimizing, and all the flies with your code. Thank you so much