Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable cache on chrome for Android?

How to disable cache on chrome for Android?

I change my page content, and refresh the page, but the content still is old.

I have set the nginx config like below, but it has no effect.

#disable cache add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma no-cache; add_header Expires 0; 

Is there a way to get my newest page without manually clear cache again and again?

like image 422
ethanzheng Avatar asked Sep 05 '13 02:09

ethanzheng


People also ask

How do I permanently disable cache in Chrome?

Here's how... When you're in Google Chrome, click on View, then select Developer, then Developer Tools. Alternatively, you can right click on a page in Chrome, then click Inspect. Click on the Network tab, then check the box to Disable cache.

What happens if I disable cache in Chrome?

Along the top of the network panel, there's a checkbox that says “Disable Caching.” This disables browser-level caching, but only as long as the DevTools are open. So it won't affect your normal browsing, but while working with the developer tools you won't have to worry about stale content.


2 Answers

This may not be the easiest way, but it will 100% work and should be part of your development setup anyway.

Using Google Chromes web tools on Windows or Mac will allow you to do "remote debugging".

  1. Enable remote debugging on Android device through Developer Menu in settings.
  2. Connect phone to PC using USB
  3. Open Google Chrome and access the developer console (F12)
  4. Click on the three dots (top right) > more tools > Remote devices.
  5. Scroll down to select your mobile device, at this stage you should see all chrome instances open on your phone. Select the instance you wish to "force reload and disable cache" by pressing Inspect
  6. Another screen should appear allowing you to access the network tab and select "Disable Cache"
like image 91
Dean Meehan Avatar answered Sep 16 '22 21:09

Dean Meehan


Currently there is no way to disable cache on chrome for Android but it is possible to clear the cache.

UPDATE: As of now there is a way to disable cache with requires your phone to be connected and needs remote debugging, please refer to Dean Meehan's answer for more info
Follow these steps to clear the cache.

http://www.refreshyourcache.com/en/chrome-android/

  1. Click on the menu button (three dots in the topright corner).
  2. Click on Settings in the menu.
  3. Click on Privacy in the menu.
  4. Click on Clear browsing data... at the bottom.
  5. Select Empty the cache from the list.
  6. Confirm clear browsing data.
like image 25
Shariq Musharaf Avatar answered Sep 19 '22 21:09

Shariq Musharaf