0

I am using an nginx container, to which I mount a volume containing my application, and copy it into the html folder:

docker run --name myApp -P -d -v /path/to/myApp:/usr/share/nginx/html nginx

i can now navigate to myApp in the browser, and edit both the index.html file, myApp.js, and the changes a reflected in the server, therefore in the browser.

After a little while though the changes to myApp.js are not synced anymore, only the modifications to the html file are.

any ideas what is going on here?

I have had the same issue with php and i had to disable the php cache, but javascript runs in the browser hence i don't know where to look.

Luke_V
  • 35
  • 7

1 Answers1

0

This might answer your Browser caching issues.

The correct minimum set of headers that works across all clients (and proxies):

Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0

You should also confirm that it is caching, by opening your website via CLI curl or browser's Incognito mode..

Ron
  • 3,697
  • 1
  • 16
  • 24