I am trying to make a playground like plunker. I just notice a very odd behaviour on production (with
active mode in CloudFlare), whereas it works well in
iframe, the playground previews
index_internal.html which may contain links to other files (eg,
iframe is able to interpret external links such as
So each time a user modifies their file (eg,
script.js) on the editor, my program saves the new file into a temporary folder in the server, then refresh the iframe by
iframe.src = iframe.src, it works well in
However, I realise that, in production (with
active mode in CloudFlare), the browser always keeps loading the initial
script.js, even though users modify it in the editor and a new version is written in the folder in the server.
If I turn Cloudflare to
script.js is reloaded successfully.
So apparently CloudFlare caches these JS files in the source of
iframe, I tried methods like
iframe.contentWindow.location.reload(true), but it did not help.
Does anyone know how to let CloudFlare in
active mode not cache these files?