ERR_CACHE_MISS in an Android WebView means the WebView tried to show a page from its cache and found nothing there. On a first load, the cause is almost always a missing INTERNET permission. After a form submission, the cause is a page that came from a POST request, and the fix is a redirect on the server.
What ERR_CACHE_MISS means in an Android WebView
ERR_CACHE_MISS in an Android WebView is a Chromium network error that says the cache has no copy of the page. Chromium’s error list gives it the code -400 and one line of explanation: “The cache does not have the requested entry.”
The cache isn’t broken. The WebView was limited to it, and it had nothing to give. Three things put a WebView in that position:
- The app has no permission to use the internet.
- A cache mode forbids the network.
- You went back to, or reloaded, a page that came from a form POST.
Which cause matches your symptom
The moment the ERR_CACHE_MISS page appears tells you which cause you have. Match your case in this table before you change any code.
| When the error appears | Likely cause | Fix |
|---|---|---|
| On the first page, every time | No INTERNET permission |
Add the permission to the manifest |
| On every page while offline only | Cache mode set to cache-only, or an empty cache | Use the default cache mode and show an offline page |
| After a form, on Back or reload | Page was produced by a POST | Redirect after the POST on the server |
| On one phone only | Old or broken WebView on that phone | Update Android System WebView |
Fix 1: add the INTERNET permission
A missing INTERNET permission is the most common cause of ERR_CACHE_MISS on a first load. Android’s WebView guide says an app that loads remote pages “must have access to the internet”, and shows the line to add:
<manifest ... >
<uses-permission android:name="android.permission.INTERNET" />
...
</manifest>
A permission becomes a cache error through a setting called setBlockNetworkLoads. The WebSettings reference says its default “is false if the application has the Manifest.permission.INTERNET permission, otherwise it is true.” With no permission, network loads are blocked. The WebView can only ask the cache, and a fresh install has an empty one.
In AndroidManifest.xml, the tag sits inside <manifest>, next to <application> and not inside it. The name must be exactly android.permission.INTERNET, which the permission reference lists as the constant value. Rebuild and reinstall after the change.
You can’t work around this in code. The WebSettings reference warns that without the permission, calling setBlockNetworkLoads(false) “will cause a SecurityException to be thrown.” The permission has a normal protection level, so the user sees no prompt for it.
Fix 2: check the WebView cache mode
A cache mode of LOAD_CACHE_ONLY causes ERR_CACHE_MISS for every page that isn’t already stored. The reference describes that mode in one line: “Don’t use the network, load from the cache.”
Search your project for setCacheMode. These are the four modes you can pass:
| Mode | What the WebView does |
|---|---|
LOAD_DEFAULT |
Uses cached files that haven’t expired, otherwise the network |
LOAD_CACHE_ELSE_NETWORK |
Uses cached files even if expired, otherwise the network |
LOAD_NO_CACHE |
Skips the cache and loads from the network |
LOAD_CACHE_ONLY |
Never uses the network |
Many forum answers tell you to switch to LOAD_CACHE_ELSE_NETWORK. That only helps if your code set LOAD_CACHE_ONLY earlier, and visitors can then see expired pages. I’d delete the setCacheMode call and keep LOAD_DEFAULT. If the app has to work without a connection, build a proper offline error page instead of forcing the cache.
Also search for setBlockNetworkLoads(true). If you turn it off again at runtime, the reference notes that blocked resources “are not fetched until WebView.reload() is called.”
Fix 3: stop the form resubmission error
ERR_CACHE_MISS after a form means you returned to a page that a POST request created. The fix is to make the server answer the POST with a redirect, so the page the visitor lands on is a normal GET page.
On a normal load, the cache is checked and content is re-validated. Back is different. The reference says “when navigating back, content is not revalidated, instead the content is just retrieved from the cache.” A POST result usually isn’t in the cache, so there’s nothing to retrieve.
Reloading fails too. The WebView asks the app whether to send the form again through onFormResubmission, and the WebViewClient reference says “the default is to not resend the data.” A Chromium developer thread from 2014 describes the case: reload a page that followed a login POST, and the load fails with net::ERR_CACHE_MISS.
Say a contact form posts to /contact and the server prints “Thanks” on that same address. The visitor opens another page, presses Back, and gets the error. Change the server so the POST answers with a 303 redirect to /contact/thanks. The 303 status exists for this: it’s often sent after a POST “so the client may retrieve a confirmation”, and the redirected page is always fetched with GET.
Overriding onFormResubmission to resend the data also removes the error, but the form is submitted twice. Don’t do it for payments or orders. If Back does nothing at all in your app, that’s a separate problem covered in making the back button go to the previous page.
Why your error handler only sees code -1
Your app can’t detect ERR_CACHE_MISS by its number, because WebView reports it as a generic error. The WebViewClient error constants cover cases such as a failed connection or a failed host lookup, and none of them is a cache miss. What onReceivedError receives is ERROR_UNKNOWN, described as “Generic error”, with the value -1.
Some guides tell you to compare the error code with a cache-miss constant. That constant doesn’t exist in the reference. Read the description string instead, which contains net::ERR_CACHE_MISS, and log the failing address. Remote debugging with Chrome DevTools shows you whether the failed request was a POST.
What clearing the cache and updating WebView can fix
Clearing the cache doesn’t fix ERR_CACHE_MISS, since the error means an entry is missing and an empty cache has even fewer entries. Do it only to rule out stale files while you test. The steps are in how to clear the cache in an Android WebView.
Updating helps in one case: the error shows on a single phone while other phones load the same app fine. Then check the WebView version on that phone and update Android System WebView.
What you can change in a no-code WebView app
In a no-code WebView app you can’t edit the manifest or the cache mode, so the only fix in your hands is the server-side redirect. That’s the limitation of builders, and it applies to WebToAPK Free too. Its options are the app name, package name, icon, colour, theme, navigation and up to 20 Website, HTML and Text sections. WebView settings aren’t on that list.
WebToAPK Free doesn’t promise that every website works in a WebView, and live website sections need a connection. Self-contained HTML and text sections work offline, so a page bundled that way never depends on the cache. Submit every form on a real phone, press Back, and fix the redirects before you share the app. The website-to-APK guide covers the build itself.
FAQ
What does net::ERR_CACHE_MISS mean?
It means the WebView was told to show a page from its cache and the cache had no entry for it. Chromium’s own description is that the cache does not have the requested entry.
Why do I get ERR_CACHE_MISS on the very first page load?
The usual reason is a missing INTERNET permission. Without it, a WebView blocks network loads by default, so it can only look in an empty cache.
Will setting the cache mode to LOAD_CACHE_ELSE_NETWORK fix ERR_CACHE_MISS?
Only if the app was set to LOAD_CACHE_ONLY before. It doesn’t help when the network is blocked or when the page came from a form POST, and it can show expired pages.
Why does ERR_CACHE_MISS appear when I press Back after submitting a form?
Going back loads the earlier page from the cache without asking the server again. A page produced by a POST isn’t stored there, and the WebView doesn’t resend form data by default.
Does clearing the app cache fix ERR_CACHE_MISS?
Rarely. The error means the cache is missing an entry, so emptying the cache doesn’t add one. Fix the permission, the cache mode or the form flow instead.