React with Laravel deployment Cache issue

632 views Asked by At

I have created an app with react and laravel, whenever made an update and deploy it, the client browser does not update the cahnges, it always load from the cache. When I am using in an incognito window or cleared the browser cache the changes reflected.

I have tried clearing npm cache as well as php artisan cache clean, It doesnt work out for me.

What should I do to clear the browser cache whenever I update the code?

Thank you in advance, Vicky

1

There are 1 answers

0
Stefano Amorelli On

Running npm run prod should re-generate assets with the proper versioning to solve the cache issue.