1

I am running localhost the following code

What happens is that my browser/server appears to cache the outdated javascript file in js folder.

I have cleared my browser cache and turn on disable cache when devtools is on. But the app.js continues to be outdated copy.

Am I supposed to do something to the nginx server?

Kim Stacks
  • 10,202
  • 35
  • 151
  • 282

2 Answers2

2

I finally figured out why.

I am using VirtualBox and I needed to turn off the sendfile configuration.

See this for more details: Prevent VirtualBox Guest from Delivering Cached Files

Just make sure for the relevant conf file inside the /etc/nginx/sites-available you explicitly say

sendfile off;
Community
  • 1
  • 1
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
0

try setting expires -1; in your nginx location rule for js files.

Chirag Jain
  • 2,378
  • 3
  • 21
  • 22