From this year onwards, we have been developing on vagrant virtual machines.
The browser refresh does not take effect when a static file is modified because a project needs to debug a static file in the previous period.
The last trace is that Nginx opened the sendfile.
Specific Sendfile principle can be checked,, on-line writing is very detailed, here is no longer described.
At first, there was a problem with the configuration of nginx somewhere. But then you just write it down and do the test.
The specific code is as follows (TCP that few steps connect here does not write.) Many online):
/** * @connect TCP connection handle*/intSendclient (intConnect) { intFD; structstat Filestat; off_t Offset=0; FD= Open ("/data/web/test.com/index.html", o_rdonly|O_nonblock); if(FD <0) {perror ("open file."); return 0; } //Get file InformationFstat (FD, &Filestat); CharBuffer[filestat.st_size]; //Read (fd, buffer, filestat.st_size); //Write (connect, buffer, filestat.st_size);Sendfile (Connect, FD, &offset, filestat.st_size); Close (FD); return 1;}
To some I measured, get or do not take effect, it can be concluded that the nginx is not related to the system scheduling
As for the question, my answer now can only be a pit of vagrant, what is specific, I also do not know,
Of course, this I also from the appearance of speculation, if someone knows the real reason, also please leave a message to advise
Remembering vagrant Nginx Sendfile problem