iframe cacheing prevention

Discussion in 'HTML & Website Design' started by davidcarlson, Mar 25, 2009.

  1. #1
    A page on my site has links that used to open in a new window, but now they open in an iframe.
    I redesigned the pages that are linked to so they will look better in the iframe.
    The problem is, anyone who has already visited my site will have the old pages cached in their browser.
    Does anyone know of a way to force pages linked to and opened in the iframe to be reloaded (apart from giving each linked page a new name?)
     
    davidcarlson, Mar 25, 2009 IP
  2. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #2
    <meta Http-equiv="cache-control" Content="no-cache">
    Code (markup):
     
    ExtremeData, Mar 26, 2009 IP
  3. fightrsi

    fightrsi Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also trick browsers into thinking that you are always loading a new page in the iframe by passing a dummy parameter to the page. For example:
    <iframe src="somepage.html?dummy=x>
    x is some random number, generate that with php or javascript.
     
    fightrsi, Mar 26, 2009 IP
  4. davidcarlson

    davidcarlson Guest

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks guys
     
    davidcarlson, Apr 5, 2009 IP
  5. coolseo36

    coolseo36 Well-Known Member

    Messages:
    979
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    140
    #5
    can ne body tell,
    hw does "noarchive" work and what is it for?
     
    coolseo36, Apr 5, 2009 IP