MyBB Community Forums

Full Version: Leverage browser caching in MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Info----
Quote:Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.

Can anyone help me out on this topic ??
How can I set expiry dates for images and php files ???

I analysed my forum speed on
http://gtmetrix.com
And it gave me a zero on this issue...

Can anyone tell me the steps ?? How to implement this ? Huh
I use this in my .htaccess

#
# Cache controls
#

<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType text/javascript A2592000
	ExpiresByType text/css A2592000
	ExpiresByType application/x-javascript A2592000
	ExpiresByType application/javascript A2592000
	ExpiresByType image/jpeg A2592000
	ExpiresByType image/gif A2592000
	ExpiresByType image/png A2592000
</IfModule> 
What does A2592000 signify ?
The time limit ?
"A" is required, can't recall what exactly but it needs to be there for this type of setting and the number is seconds to expire. 2592000 is 30 days, IIRC
Ok one last question.....
Where should I ad the code in .htaccess ???
nice trick pavement Wink
Where to add the code in .htaccess
I am using the Google Seo plugin too so its code is also there in .htaccess
Put it at the bottom.
yes, at the bottom is fine. however, this trick only works if your server has mod_expires installed into Apache
Ok mate thanks for the help Smile
Pages: 1 2