Jump to content

Expiry date (images)


Recommended Posts

Posted

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..

Posted

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

Posted

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>
Posted

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.

Posted

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>

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...