I have a scenario where the main website (which I have no control over) is loading my website from within an iframe. It’s a GET with query string parameters chosen by the user on the main website. The issue is that IE caches my first page inside of that iframe.
I applied the following meta tags:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
But IE is still caching it just for about 15 – 20 seconds or so. So if the user quickly goes back to the main website and chooses something else, they would see the cached version of my first page. What can I do here?
Try busting the cache from the server by setting appropriate HTTP response headers:
and then decorate your controller action that is supposed to serve the
<iframe>with this attribute: