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?

2 Answers 2

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;
Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

I am surprised by this answer. Is this necessary?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.