XF 1.1 Caching style elements

Jeff Fuqua

Well-known member
I'm attempting to speed up my site and see that many of my style elements are recommended for longer caching because they have a "short freshness lifetime". Is there a way to specify an expiration of a week or more somewhere in the admin? Thanks.
 
I'm attempting to speed up my site and see that many of my style elements are recommended for longer caching because they have a "short freshness lifetime". Is there a way to specify an expiration of a week or more somewhere in the admin? Thanks.
Add something like this to your root .htaccess file (what I use on my site).

Code:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4|css|js)$">
Header set Cache-Control "max-age=2592000, public, must-revalidate"
</FilesMatch>
 
#SetOutputFilter DEFLATE
AddOutputFilter DEFLATE xhtml html htm php css js xml xsl txt plain javascript x-javascript ico
 
Top part controls the caching and the bottom part takes care of the compression.

If you wanted to you could technically set the cache for 1 year without any issues. Just make sure to rename your new images. For example your current header image is called logo.jpg, so next time you change it call it logo2.jpg or something else.
 
Yes. I'm using zenporta which must have all news slider photos named slide.jpg.

I'll overlook that Colts comment since you are sharing knowledge with me. ;)
I'm not familiar with the news slider, could you please PM me the site link. I'm pretty sure that the images still have a unique name.

Yeah I actually don't care that much about football, I'm more of a motocross guy, however I'm still a Hoosier. Lol
 
My site is under construction but it's gotitans.com/xf.

NewsSlider requires the attachment always be the same name. But the image is pulled from the thread so don't know how that would impact things.
 
My site is under construction but it's gotitans.com/xf.

NewsSlider requires the attachment always be the same name. But the image is pulled from the thread so don't know how that would impact things.
Yorick confirmed what I thought happened with the news slider images, with them being uploaded they have an attachment ID appended to them. This would make them all unique. (y)

BTW the XF version of GT looks a LOT better/cleaner.
 
Top Bottom