Skip to main content

Forums

This topic contains 5 replies, has 0 voices, and was last updated by  in4308 9 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25292

    in4308
    Member

    Hi All,

    I was wondering if anybody knows of any code that I could place onto my site that would FORCE firefox to update its cache of the site its viewing?

    I’ve recently changed my site around but firefox is showing the old cached version when it first loads up. I know I can hit refresh and it will change to the new one (which is does)…..But, I dont want all the users viewing my website to have to do that as it puts out a bad impression….

    Any ideas?

    Thanks in advance.

    #59852

    apostrophe
    Member

    It depends what you have changed. If it is just the css then rename your css file to something like style1.css.

    It can also be achieved by adding this to your .htaccess file but then the page will never cache which is also not good.

    Code:
    Header set cache-Control: “no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0”
    #59850

    in4308
    Member

    Thanks for this.

    I’ve actually completely changed the site. New design, new content, new CSS, the lot.

    But, for the some reason it still shows parts of the old site. Something I have done though is archive the old site on my FTP server into an ‘Archives’ folder, would you recommend deleting it completely? ‘Cause i didn’t think it would have caused any conflicts but it just seems to be a little.

    Any other ideas guys?

    #59851

    apostrophe
    Member

    Then I would contact your webhosting company.

    #59849
    "in4308" wrote:
    But, for the some reason it still shows parts of the old site. Something I have done though is archive the old site on my FTP server into an ‘Archives’ folder, would you recommend deleting it completely?

    Yea… some thoughts: If they ctrl+f5 does it update the images? Or is it still a problem for every browser?
    If it’s a problem for every browser (after the hard refresh), the old image is still being linked to. (The link could have been updated when you moved it.)
    If it is corrected after a refresh, see idea below:

    "apostrophe" wrote:
    If it is just the css then rename your css file to something like style1.css.

    Or, an easier way to rename the file is by adding a quertystring to it:

    style.com?1

    Although the file doesn’t change at all, it looks like a new file and so is refreshed. You can do this to images too:

    img.jpg?2

    I hope that helps.

    #60829

    For this I would go with the query string idea, in the future you should just add a meta string:

    [url]
    <meta HTTP-EQUIV="Expires" CONTENT="Tue, 17 Jul 2009 21:00:00 GMT">
    [/url]

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star