I do changes and are not reflected in users devices and I think is cache issue. run npm run production before deploying but nothing. The only way to see the changes in the site is my pressing F5. I will give you a list of the things I try without success:
-
run commands in server terminal:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear -
.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]Header set Cache-Control “no-store, no-cache, must-revalidate, max-age=0”
Header set Pragma “no-cache”ExpiresActive On
ExpiresByType text/css “access plus 1 second”
ExpiresByType application/javascript “access plus 1 second” -
Adding params in app.blade.php to keep it updated:
-
adding version in webpack.mix.js:
const mix = require(‘laravel-mix’);
mix.js('resources/js/app.js', 'public/js')
.react()
.postCss('resources/css/app.css', 'public/css')
.version();
Now I did a big update and most of screens are completly white and only F5 will solve it, but cant go asking to users to do that.
What else can I try?