Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
marklcfc Posted October 25, 2012 Posted October 25, 2012 How do I set this up so that some images have an expiry date. As you can tell I have no idea, I just ran a speed test and it came under high priority that I set an expiry date or maximum age for certain images..
Haku2 Posted October 25, 2012 Posted October 25, 2012 How do I set this up so that some images have an expiry date. As you can tell I have no idea, I just ran a speed test and it came under high priority that I set an expiry date or maximum age for certain images.. This post should help: http://community.invisionpower.com/topic/315663-speeding-up-loading-times/?p=2041067
marklcfc Posted October 25, 2012 Author Posted October 25, 2012 Ok, so after looking at that what would I change the following to. ExpiresByType image/jpg "access plus 1 month" so it works for these two images. I'm guessing it shouldn't be ExpiresByType for individual files so how would I use it if for example using the above files
Haku2 Posted October 25, 2012 Posted October 25, 2012 Ok, so after looking at that what would I change the following to. ExpiresByType image/jpg "access plus 1 month" so it works for these two images. I'm guessing it shouldn't be ExpiresByType for individual files so how would I use it if for example using the above files Well, if you want it to work only for those two images, you can create two .htaccess files and place each .htaccess file in the appropriate directory.In the public/style_images/master/ directory, create an .htaccess file containing the following code: <ifmodule mod_expires.c> <files ft2010.gif> ExpiresActive on ExpiresDefault "access plus 1 month" </files> </ifmodule> In the public/style_images/master/profile/ directory, create an .htaccess file containing the following code: <ifmodule mod_expires.c> <files default_large.png> ExpiresActive on ExpiresDefault "access plus 1 month" </files> </ifmodule>
marklcfc Posted October 25, 2012 Author Posted October 25, 2012 Ok thanks. I have Print HTTP no-cache headers set to Yes currently, will this stop the browser caching these files? I've never understood this setting.
marklcfc Posted October 25, 2012 Author Posted October 25, 2012 How do I set it for all files in style_images/master?
Haku2 Posted October 27, 2012 Posted October 27, 2012 Ok thanks.I have Print HTTP no-cache headers set to Yes currently, will this stop the browser caching these files? I've never understood this setting.I don't think so. I think it only prevents the browser from caching pages served by IP.Board, but you might want to ask one of the support staff in a support ticket to make sure.How do I set it for all files in style_images/master?In the style_images/master directory, create an .htaccess file containing the following code:<ifmodule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" </ifmodule>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.