Jump to content

question about browsing


tendouser

Recommended Posts

I uploaded new pictures to a website I maintain and is hosted in my unlimited web hosting shared hosting account.  When I browse this site through Firefox I have to refresh to see the new or edited images; same browsing through IE.  How can I prevent this to happen because old cache??

 

Thanks!

 

Link to comment
Share on other sites

it could be cache indeed, something you might want to add in an .htaccess file on your server is the following

 

    # Sets the cache control for 1 week
    <FilesMatch "\.(css|jpg|png|gif|swf|js)$">
    Header set Cache-Control "max-age=604800, must-revalidate"
    </FilesMatch>
     
    # turn on the module for this directory
    ExpiresActive on
     
    # set default
    ExpiresDefault "access plus 24 hours"
    ExpiresByType image/jpg "access plus 1 months"
    ExpiresByType image/gif "access plus 1 months"
    ExpiresByType image/jpeg "access plus 1 months"
    ExpiresByType image/png "access plus 1 months"
    ExpiresByType text/css "access plus 1 months"
    ExpiresByType text/javascript "access plus 1 months"
    ExpiresByType application/javascript "access plus 1 months"
    ExpiresByType application/x-shockwave-flash "access plus 1 months"

 

the article on the example given above is: http://www.flingbits.com/tutorial/view/improve-your-sites-performance-with-apache

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.