Hi,
I have a problem with reloading css assets in a theme, no matter what I do, changes to the css file in my theme don’t appear in the browser. I have disabled caching, twig caching, restarted webserver, clear opcache, deleted whole cache folder, but to no success.
I am running grav in vagrant on nginx with php 7.1.
The problem was mentioned on this forum more than once, but I tried everything suggested there and even reinstalled whole grav.
Thanks for your suggestion, but this doesn’t work either, i tried multiple different browsers, cleared cache, disabled it but no luck. When I check the network tab in chrome dev tools, it shows it has fetched the main.css file but somehow it has old content in it, not the new one. If I navigate browser to the location of the css file it shows the old content too.
I finally figured it out, the problem that in the theme I am using the main.css file is not added through assets.add() function but with tag so it completely circumvents the grav core logic and stilll gets cached somewhere (I still haven’t figured where). Thank you very much for your support @flaviocopes.
It seems I was a bit rash with the above solution, because it worked only for the first edit of that file after that the error repeated. After extensive googling I finally found the real culprit, it is a bug in vagrant with virtual box provider that breaks nginx sendfile function. So for development you should disable it in /etc/nginx/nginx.conf. With that you are ready to go.