FreshSuperCool.com

July 10, 2008

Firefox caching iframe data

Filed under: web 2.0 — Tags: — taewoo @ 1:48 pm

Ok this is a repost cuz of stinkin’ DreamHost.

If you have an auto-generated iframe from a javascript, and this iframe has dynamic data, FireFox (but not IE) wll cache your data. Even if you have

<META HTTP-EQUIV=“Cache-Control” CONTENT=“no-cache”>
<
META HTTP-EQUIV=“Pragma” CONTENT=“no-cache”>

After days of pulling out my hair (or what little I have left), i found out the only way around this is by calling this in your JavaScript:

iframe.src = iframe.src;

This basically forces the browsers to reload. Not the most efficient solution but it works. Also, I haven’t tested to see if I could remove this with FireFox 3 coming out but no matter. The rest of the world is gonna take 1-2 years to download FF3 anyway.

PS: Hairloss is not due to masturbation. Thank god for that.

Share/Save/Bookmark

2 Comments »

  1. hello, I have the same problem,
    do you have full code about this ?

    thanks.

    Comment by Alien Y — September 22, 2008 @ 3:36 am

  2. Hey Alien Y.
    I basically posted the solution.. read again

    Comment by taewoo — September 23, 2008 @ 12:48 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment