Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm doing some website development, and I'm changing files (e.g. CSS) on a remote server. I am testing to see what it looks like on my 2.2 android phone (HTC Desire). I want to refresh the page to see the new changes as I make them. I can press the refresh button on the menu bar, but I'm not convinced it is always showing me the new page, since it might be cached.

Is there anyway to 'force refresh' the webpage on the web browser? Something like Shift+F5 on Firefox?

share|improve this question
2  
what I usually do in this sort of cases (even on desktop browser) is to make changes that are really obvious (such as turning the whole background ugly blue) to check that I'm not using a cached version. –  Lie Ryan May 23 '11 at 16:09
5  
I won't post this as an answer, since it's so roundabout ... but you could close the window, go into Menu -> More -> Settings and clear the cache. –  Matthew Read May 23 '11 at 17:12
    
Not an Android-centric solution, but one way to make sure externally linked files (CSS, JS, images, etc) aren't being cached are to rename the files each time you test. For example, instead of saving as "homepage.css", save as "homepage-2.css", or "homepage20110707A.css", and update the links in your HTML. You can rename them to something simpler before your final deployment. Kind of a pain, I know. But it works. –  Joshua Carmody Jul 7 '11 at 20:43
add comment

6 Answers

Download InBrowser: https://market.android.com/details?id=nu.tommie.inbrowser

It doesn't save any data so there is nothing to cache; there is also no need to root. It uses the Android browser to render so for testing purposes, it should be identical to the Android browser.

share|improve this answer
add comment

Not a quick solution, but this does always force a reload of all resources from the server (though the server itself may cache pages depending on your output cache settings there):

  1. Menu button
  2. Settings
  3. Clear cache
  4. Press OK, exit the Settings menu
  5. Reload via the menu bar reload button

**

(steps from Android 2.3; others are similar)

share|improve this answer
add comment

I've noticed that if I refresh over wifi it'll completely refresh, but if I refresh over cellular it won't. This with both the Android native browser and Opera mobile. on an LG Thrill with android 2.2.2. Maybe it'll work for you.

share|improve this answer
add comment

On my Samsung Galaxy S2 I can do a force F5 refresh like this:

Start default browser
Press menu button
Click 'More'
Click 'Settings'
Clear Cache, Clear History, Clear all Cookie Data.

Then stop and restart the browser.

share|improve this answer
add comment

Load the stylesheet in another tab directly with its url and refresh it. If you see the changes reflected there then it'll also change the cached version that loads when you refresh your webpage. This works in Dolphin too.

I also found that if you plug in a keyboard, you can press shift and reload just like on desktop. But I prefer to see the changes as above just to be sure...

share|improve this answer
add comment

If you are rooted , you could install CyanogenMod

This comes with an incognito mode which shouldn't cache sites to your phone.

Another imperfect solution if you are not rooted is to go into your browser, in the address bar type 'about:debug' then hit 'Go' . Then in settings drop the cache size down to minimum which is 100kb.

share|improve this answer
    
Incognito mode will still cache the current session's requests. So depending on your refresh needs, this may not be a solution. –  Mufasa Oct 30 '13 at 19:48
    
Making a permanent setting to limit that is a bad idea; what happens when you forget to set it back? Everything gets slow and you have no idea why. Also, what if what you want to refresh fits within that still small 100kb setting? –  Mufasa Oct 30 '13 at 19:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.