Clear browser cache via js

How i can emulate the devtools clear cache but in javascript
3 Replies
glacinefrox
glacinefroxOP6mo ago
i already done the purge cache from api but the browser stills have the old version
z0rrn
z0rrn6mo ago
I don't think that's possible. Maybe you should implement something like cache busting / asset hashing https://www.keycdn.com/support/what-is-cache-busting .
KeyCDN
What is Cache Busting? - KeyCDN Support
Cache busting solves browser caching issues by using a unique file version identifier to tell the browser that a new version of the file is available.
glacinefrox
glacinefroxOP5mo ago
Currently I have cf to cache my html and js files and I have an endpoint to clear it and o have an API that says like the ctag and I detect it but I can't find a way to refresh without cache Years before was as simple as adding a true to location.rekoad
Want results from more Discord servers?
Add your server