Closed emreyo closed 9 years ago
Actually, we use a cache-busting mechanism to make sure that the browser downloads the most recent version of the css or js files. Take a look at https://github.com/CodepadME/laravel-tricks/blob/master/public/.htaccess , specifically the "Better cachebusting" section.
In other words, when you release a new version of CSS or JS files, you have to rename them by changing the number according to the version of your site (1, 2, 3, etc).
In the future this will be done automatically and in much better way with Gulp.js.
But can't you append
?v=2
or something like that for this purpose? This does not work on local.
Are you running on Nginx (Homestead)? If so, make sure you have this in your Nginx config:
location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ {
try_files $uri $1.$2;
}
Thanks. I wasn't aware of that. I use
styles.css?v=2
for this purpose. Thank you very much for the info.