Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

User1980's avatar

Is there a way to link a button to the browser cache emptying function?

Hi all,

I wonder if there is a way to programmatically show a button on your site to a user saying:

"Hey, the site has been updated! Clear your cache to get the latest update!".

And have the user clicking the button which empties the cache in his browser, including any types of browsers form any OSes: IOS, Androids, Windows OS.

Is there a clever library for this please? Or perhaps it can be done easily? Or ....it is not possible at al.

Thanks!

0 likes
3 replies
User1980's avatar

Wow, thanks! This is so cool to know....Brilliant!

User1980's avatar

I wanted to ask you something please as I will soon try to implement it.

cache.delete(request, {options}).then(function(found) {
  // your cache entry has been deleted if found
});

In the above example(from the link you gave me), will this empty fully the browser cache or do I need to add some code within the request? If code is needed, how would you, for example, point to the deletion of the vue data within Laravel? I am a bit confused on that one. Thanks

Please or to participate in this conversation.