Support the ongoing development of →
Last updated 1 year ago.

I think I figured out a solution. I was able to turn on and off the problem by removing and adding the following code to the nginx configuration file. I am going to watch it for a while and see if the problem remains fixed.

location ~* \.(?:html|css|js|png)$ {
    expires modified 1s;
    add_header Pragma public;
    add_header Cache-Control "public";

To edit this file go to the console in the homestead directory (I used gitbash on Windows).

$ vangrant-ssh
//Accesses the VM
$ cd /etc/nginx/sites-available
$ sudo vi {your_domain} 
//your_domain will be something like Use whatever you set in the homestead.yaml file for "sites -map"

Lookup vi commands if you are unfamiliar with using the console based text editor. Then add the code above to that file.

In order for this to take effect, you may need to clear your browser's cache so that the file with the new headers can come from the server instead of being called from the cache.

Last updated 1 year ago.

My solution above did not appear to work. I am still getting some cached html files back. Has anyone else encountered this? Has anyone found a different solution?

Last updated 1 year ago.

i keep on facing this problem from time to time and the only solution that works for me is disabling opcache and reload vagrant

Last updated 1 year ago.

Sign in to participate in this thread!


Your banner here too?

nvanselow nvanselow Joined 30 Jul 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.