When you try to modify a JS, and update with the same method, you will encounter similar problems, yes, even restarting any service on the VM, even restarting the VM, it is still useless, of course, compared to other resource files, the browser will react strongly, because the browser prompts unknown errors, And you view your modified JS file through the browser, you will see the file tail has the following strange random characters:
?????????????????
What the hell is this thing? Coding error? Cache exceptions? or something else?
Yes, you try to spend a lot of time experimenting with various methods to solve this problem, in fact, for Nginx, you only need to modify the configuration file (nginx.conf) in a single line of the restart can be simple to solve the problem:
sendfile off;
Find nginx.conf and change the "sendfile on" inside to "sendfile off".
Of course, if you use Apache and you may encounter similar problems, there are similar configurations that need to be modified:
Enablesendfile off
Reference:
Https://blog.smdcn.net/article/1325.html
https://github.com/mitchellh/vagrant/issues/351#issuecomment-1339640
Http://stackoverflow.com/questions/9479117/vagrant-virtualbox-apache2-strange-cache-behaviour
JS error when using vagrant as the development environment