Jump to content

Expiry date (images)


Recommended Posts

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

Link to comment
Share on other sites

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>
Link to comment
Share on other sites

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>
Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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