views:

236

answers:

1

I.e. something that would really reload the page or resource, ignoring whatever might be in cache.

+4  A: 

Safari always reloads (ctrl+r) a page ignoring whatever that might be in the cache.

As Athena points out, iframes are cached. It's actually not the iframe content, but the request that's cached.

In those cases, Safari caches the page, and then no matter which link you click, shows the iframe from the last click BEFORE the refresh (or back/forward). It's then stuck on that content, and shows it for all links.

This is overcome by assigning a different iframe id on each load:

iframe.id = new Date().getTime();

Swati
IME, this may not always be true if you're dealing with iframes.
Athena
I think you mean Cmd+r
Geoff
Swati: oh nice. I've seen someone run into that error before, and deduce through trial and error that adding an ID would fix it. But that has always felt magic-incantationish to me. This is the first time that I have seen an actual explanation.Thanks!
Athena