0

I have a web component that is embedded into a page using a file called loader.js. I do not have control of the filename as it's being called in a separate application. How would I always reload that file whenever the page is loaded, so that the file is never delivered from HTTP cache? Normally, I would add some sort of suffix to the file based on the build such as loader.js?v123.4, but in this case I don't have access to the code that is calling it since it's embedded in another application. How could I do this?

samuelbrody1249
  • 4,379
  • 1
  • 15
  • 58
  • What's your goal? You can do this with dev tools if you need this for dev purposes. This is solved from server side, as you may notice from other cache-related questions. You can't do anything from client side if it's not your app (except maybe patching XHR which is not a proper option by any means). – Estus Flask Mar 23 '20 at 19:29
  • This will help you to solve your problem. https://stackoverflow.com/a/39018813/5233738 – Vaibhav Bhuva Mar 23 '20 at 19:32
  • @VaibhavBhuva where? That is saying exactly what I'm saying in my question I'm not allowed to do. We don't have control of the application that is embedding it. – samuelbrody1249 Mar 23 '20 at 19:34

0 Answers0