Skip to content

Guides

Website Changes Not Showing in Your App? How WebView Caching Works

You updated the site, Chrome shows it, the app still shows yesterday's page. Here is how to find which cache is holding it and what to change.

10 min read

If website changes are not showing in your app, the usual cause is a stored copy of the old page: in the app's WebView cache, in a service worker, or in a caching plugin or CDN in front of your site. An app that loads your live website normally needs no new release for content changes. Start by checking the cache headers your server sends.

Do I need to update my app when I update my website?

It depends on where the thing you changed lives. A WebView app is a native shell that loads pages from your server. Text, prices, products and styling come from the website. The app's icon, name and splash screen are packaged inside the app file, so changing those means building and releasing a new version.

What you changedNew app release?Where to look if it does not appear
Page text, prices, products, blog postsNo, if the app loads your live siteServer headers, page cache, CDN
CSS or JavaScriptNo, if the app loads your live siteWhether the file URL changed
App icon, app name, splash screenYesWhether the phone installed the new version
Files bundled inside the app instead of loaded from your serverYesYour builder or developer

If you do release a new version through Google Play, each upload needs a higher version code. See what to do when Play says a version code is already used.

Why does my app show the old version of my website?

Android's WebSettings documentation says the default cache mode is LOAD_DEFAULT. On a normal page load the cache is checked and content is revalidated as needed. When a user navigates back, content is not revalidated and comes straight from the cache. So an old page after pressing Back is expected behaviour and does not prove your update failed.

On a normal load, what counts as "as needed" depends heavily on your server. MDN's guide to HTTP caching explains that a response with no Cache-Control header can still be stored and reused. This is called heuristic caching. The specification suggests reusing it for about 10% of the time since it last changed, although the exact period is up to each implementation. As an illustration, a page untouched for 20 days could be treated as fresh for around 2 days.

Your phone's browser and your app also keep separate histories of what they have loaded. Chrome showing the new page does not tell you what the app has stored.

How do I find which cache is holding the old page?

  1. 1

    Open the page on a device that has never visited it

    Use a private window on a computer. If this shows the old content too, the problem is on the server side: a page cache, a plugin or a CDN.

  2. 2

    Read the response headers

    Run curl -sI https://yourdomain.com/page in a terminal, or open the Network panel in your browser's developer tools. Look for Cache-Control, Expires, ETag, Last-Modified and Age.

  3. 3

    Compare Back with a fresh load

    Close the app fully and reopen it on that page. If it only looks old after pressing Back, that matches the documented WebView behaviour.

  4. 4

    Test once with cleared app data

    In Android settings, open your app's storage options and clear its data. This signs you out. If the new content appears, the old copy was stored on the phone.

  5. 5

    Check for a service worker

    If your site is a PWA or uses an offline plugin, a service worker may be answering requests from its own stored files.

Which Cache-Control headers should my website send?

MDN's common pattern is to make HTML pages check with the server every time, and to give files with changing names a long lifetime.

ResourceHeaderWhat it does
Public HTML pagesCache-Control: no-cacheMay be stored, but must be validated before reuse
Signed-in or personalised pagesCache-Control: no-cache, privateSame, and shared caches must not hand it to others
CSS and JS with a version or hash in the file nameCache-Control: public, max-age=31536000, immutableKept for a year; a new file name fetches the new file
CSS and JS with a fixed file nameCache-Control: no-cacheRevalidated, so edits are picked up

The names mislead people: no-cache does not mean "do not store". It means "ask before reusing". Keep ETag or Last-Modified on your responses so the server can answer with a short 304 Not Modified when nothing changed.

One limit matters. A long max-age already sent cannot be recalled from your server, because the phone stops asking until it expires. MDN lists the Clear-Site-Data: cache header, but it only helps once a response carrying it reaches the app, and it does not clear intermediate caches. For changed files, a new URL such as style.v2.css is the dependable route.

Can a WordPress cache plugin or CDN cause this?

Yes. In one WordPress support thread about a WebView app, new posts did not appear on the app's home screen while LiteSpeed Cache was on. The site owner reported that disabling it, or excluding the app by its user-agent string, solved the problem. That is one report, not proof that the plugin always does this, but it shows where to look.

  • Purge the page cache in your caching plugin, then reload the app.
  • Purge the CDN cache separately; the plugin's button may not reach it.
  • Check whether your host adds its own caching layer.
  • If only the app is stale, ask whether any rule treats its user agent differently.

If your site runs on WordPress, our guide to turning a WordPress site into an Android app covers the rest of the setup.

Should the app just turn caching off?

Usually not as a first fix. Android offers LOAD_NO_CACHE, which skips the cache and loads from the network. It trades speed and mobile data for freshness on every page. LOAD_CACHE_ELSE_NETWORK does the opposite and uses cached resources even after they expire, so an app set that way can stay old for a long time. If your developer or builder controls this setting, ask which mode the app uses. Correct headers on your site fix the problem for browsers and the app together.

While you are testing the app, run through our checklist for preparing a website for a WebView app. If you want to tell users that something new is live, a push notification does that, but it does not clear any cache.

Frequently asked questions

Does a website-to-app update automatically when I change my website?
If the app loads your live website, content changes come from your server and need no app release, subject to caching. Changes to the app icon, name or splash screen need a new build.
How do I clear the cache of a WebView app on Android?
Open Android settings, find the app, and go to its storage options. Clearing cache removes temporary files; clearing data resets the app and signs you out. Menu names vary by phone.
Why does Chrome show the new page but my app shows the old one?
They store what they have loaded separately, so one can hold an older copy than the other. Check your Cache-Control headers and any caching rule that treats the app's user agent differently.
Is no-cache the same as no-store?
No. MDN explains that no-cache allows storing but requires validation with the server before reuse. no-store tells caches not to store the response, and it does not delete a copy already stored.