How can I force a hard reload in Chrome for Android
In Chrome for desktop I have options in the dev tools to disable cache completely when dev tools are opened and I have the options to manually do a hard reload when long clicking on the reload button (with dev tools open).
Is there any such technique for Chrome for Android? I didn't find any setting. What can I do when I want to force the browser to download some javascript or css file instead of using a cached one when developing?
I'm using window.location.reload(true)
according to MDN (and this similar question) it forces page to reload from server.
You can execute this code in the browser by typing javascript:location.reload(true)
in the address bar.
Viewing the page in incognito mode will disable the cache. It was the only way I could force a refresh on a stylesheet without manually clearing the cache through the settings.
Also an option:
- Menu
- Settings
- Privacy
- Clear Browsing Data
- Check "Cache" and press "CLEAR"
and then reload the page.
You can use the Request Desktop Site option from the app menu (to the right of the address bar) which will force the page to reload.
Simply tap it, wait for the refresh, then deselect it.