I want to prevent my iframe from being cached. The first page isn’t a problem. Then I use PHP like this:
<iframe id="my_iframe" src="index.html#<?php echo time() ?>"></iframe>
The problem I have is to prevent chaching when link is clicked inside the iframe. eg.:
<a href="newpage.html">this page will be cached</a>
How can I prevent cache of the “newpage.html”? Can I somehow add timestamp to the src using java script?
yes you can do that,
this script should be placed before the closing of the body tag, or it should be generally be called after the DOM has loaded.
Now, isn’t there a backend way (with headers) to ask the browser not to cache some specific pages?