Elxis CMS Forum
Support => General => Topic started by: xmanhattan on September 28, 2013, 10:44:39
-
Hello all,
I came across this website while researching http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html (http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html)
Basically, websites that are targeting mobile users need as much speed as they can get.
Should we use the following in htaccess to modify the cache timing?
# BEGIN Expire headers
ExpiresActive On
ExpiresDefault A60
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType text/javascript "A604800"
ExpiresByType application/javascript "A604800"
ExpiresByType text/css "A604800"
<FilesMatch "\.(gif¦jpe?g¦png¦ico¦css¦js¦swf)$">
Header set Cache-Control "public"
</FilesMatch>
#turn off etags
Header unset Pragma
Header unset ETag
FileETag None
I noted using a website testing at http://gtmetrix.com/ (http://gtmetrix.com/) that there was a small problem with etags.
Does anyone have any experience with or know more about these Apache features?
-
The mobile version contains very few images I don't think there is a speed issue there.
-
Hello Datahell,
Sorry, the question regards the 2009.3 version.
-
Thanks for bringing this up! I am also interested in this subject but for elxis4.x
-
Does the code shown conflict with the use of Elxis cache control in the configuration?
Has anyone using 2009.3 compared their site performance with or without the cache?
-
Hi, I have tested my website (elxis. 4.x) with the following expires header and the speed gain was huge (pagespeed from 41 to 61 and YSlow from 71 to 88%). The pagespeed could be further increased with scaled images. For this I will open a new post as I don't know how to scale images with the elxis gallery plugin.
########## Begin - Expires Header
#
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 week"
ExpiresByType image/x-icon "modification plus 1 year"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType video/x-flv "access plus 1 year"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/js "access plus 1 month"
ExpiresByType text/html "access plus 1 minute"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>
#
########## End - Expires Header
########## Begin - Turn ETags Off
FileETag None
#
########## End - Turn ETags Off
-
I am seeing page speed graded at 86% with a yslow grade of 74% and Page load time: 4.59s
Total page size: 464KB, Total number of requests: 60 so far.
The image on my page is 978px × 374px @ 39k so I think that it is helping too.