Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clearing cache after development for visitor

I'm developing sites and some visitor's browsers appear with old cache.

Is there a way we can clear visitor's browser cache using codes from the server side or even javascript so they don't have to clear themselves?

I cannot find the direct answer to this.

There must be a way big companies do like Facebook, Ebay etc

like image 262
John Kim Avatar asked Oct 06 '22 08:10

John Kim


1 Answers

We have been using htaccess to determine the caching rules of the clients. We explicitly give the cache a 24h lifetime and we put no-cache rules the day before we do the update. It has helped but it is tedious and not so reliable.

Just posting it to give you ideas if no one answers, but I would really love to get the answer too. :)

like image 50
Salketer Avatar answered Oct 14 '22 01:10

Salketer