SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Clear the cache? Still showing old content?

    Hi all, not sure if this is the right forum in not please transfer me.

    Ok my problem is I need to add some code, preferable HTML or XHTML I think to the HEAD TAG. Ive been running a site for sometime now and just realized that some people are still seeing the site from say Tuesday when I updated it on Thursday, how or what can I add so if the site has been stored in the users cache without being cleared after there visit it will automatically update it's self?

    If this makes sense?

    Cheers

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Browser caching is normally controlled by sending the appropriate HTTP headers when the page is served. If your old pages have been served with cache control headers that say they're still valid and don't need to be re-checked, then there's nothing you can do about it other than to wait for them to expire.

    The caching tutorial is a good introduction to this complex topic.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Cuckoo

    So what will I did to do so every time somebody comes to my site, they will get the very latest up to date content?

    You mention appropriate HTTP headers, cache control headers ?

    This is how my page looks:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <META NAME="Description" CONTENT="test title">
    <META NAME="Keywords" CONTENT="test, test1, test2">
    <meta name="revisit-after" content="15 days">
    <META NAME="Language" CONTENT="english">
    <META NAME="Robots" CONTENT="All">
    Something I need to add?

    upadate
    just got the link cheers, quite a lot of reading on this subject

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by computerbarry View Post
    So what will I did to do so every time somebody comes to my site, they will get the very latest up to date content?
    That's the problem: you can't do anything about it now (other than to change the URI). If the pages you have already served say that they should be considered 'fresh' for a long time, browsers may not even bother to ask your server if there's anything newer. It's not something you can change after the fact.

    Quote Originally Posted by computerbarry View Post
    Something I need to add?
    Those are just meta elements, which may be ignored by user agents. You need to set up your server to send the appropriate real HTTP headers for cache control. Real HTTP headers always take precedence over meta elements.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Addict
    Join Date
    Jan 2007
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to go over to mnot.net and check out the cacheability test/recommendation links on the left side.

    Do what they don't recommend for the one page that is of interest to you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •