Przejdź do treści głównej

Poradniki / Napraw to: poradniki na błędy, które naprawdę się zdarzają

ERR_CACHE_MISS: what it means and how to fix it

ERR_CACHE_MISS means Chrome needed a saved copy of the page and its cache did not have one. It appears most often when you press Back or Reload on a page that a form submission created, where Chrome titles it "Confirm Form Resubmission".

What ERR_CACHE_MISS means

Chromium, the engine behind Chrome, Edge, Brave and Opera, defines CACHE_MISS (-400) as "The cache does not have the requested entry." A missing cache entry is normally harmless, because the browser just asks the server. The error appears only when the browser was told to answer from its cache and not to use the network. In the Chromium source this is the load flag LOAD_ONLY_FROM_CACHE, described as a navigation that fails if the cache cannot serve it. When the cache cannot answer, the load fails with ERR_CACHE_MISS and no request goes out.

Two common situations produce a cache-only load. The first is a history navigation (Back or Forward) to a page that a POST request created. Chrome will not send a POST again on its own, because a repeated POST can repeat its action, such as a second order, payment or message. A comment in Chromium's error page code describes the case as "navigating through the history to an uncached page created by a POST". The second situation is an application that asks its embedded browser engine to stay off the network, for example an Android app that runs a WebView in cache-only mode.

The entry can be missing because the browser never stored the response or because the entry was removed. A response with Cache-Control: no-store is never stored: RFC 9111 says a cache must not store any part of the request or the response, and Chromium skips storing no-store content. Clearing browsing data between the form submit and the Back press removes entries too. If Chrome cannot open its disk cache at all, for example because the disk is full or another program locks the cache files, nothing is stored and a cache-only load has nothing to read.

How the error appears

On a desktop browser you press Back or Reload and see a page titled "Confirm Form Resubmission". It says the page needs data you entered earlier, and that sending the data again repeats the action the page performed before. It tells you to press the reload button of the browser to send the data again. ERR_CACHE_MISS is printed at the bottom. Edge, Brave, Opera and other Chromium browsers show the same page. In DevTools, the Network panel lists the page request as failed with net::ERR_CACHE_MISS.

Android developers see the error in their own code. A WebView reports it through onReceivedError:

webView.webViewClient = object : WebViewClient() {
    override fun onReceivedError(
        view: WebView, request: WebResourceRequest, error: WebResourceError
    ) {
        if (request.isForMainFrame) {
            Log.w("WebView", "${request.url}: ${error.description}")
            // https://example.com/: net::ERR_CACHE_MISS
        }
    }
}

The comment in the code shows the kind of log line you get.

ERR_CACHE_MISS vs similar errors

ERR_CACHE_MISS is the only error in this table where the browser deliberately did not try the network. The others failed while trying, or the device had no connection to try. The numbers are Chromium's internal error codes.

ErrorWhat happened at the network or protocol levelWhere to look first
ERR_CACHE_MISS (-400)The browser was allowed to use only its cache and the cache had no entry. No request reached the server.The Cache-Control header of the original response, whether a POST created the page, the cache mode of the app.
ERR_CACHE_READ_FAILURE (-401)A cache entry exists, but the disk cache could not read it.A damaged browser cache or disk errors. Clearing cached files usually fixes it.
ERR_CLEARTEXT_NOT_PERMITTED (-29)Android blocked an http:// request because of the network security policy of the app.The cleartext settings in the app manifest or network security configuration.
ERR_INTERNET_DISCONNECTED (-106)The operating system reports that the Internet connection has been lost.Wi-Fi, cable, airplane mode, the router.
ERR_NAME_NOT_RESOLVED (-105)The DNS lookup returned no usable IP address, so no connection was attempted.The DNS records of the domain and the resolver of the device.
ERR_CONNECTION_TIMED_OUT (-118)The SYN went out and nothing came back until the client gave up.Firewalls that drop packets, and whether the host is up.

What causes ERR_CACHE_MISS

  • Back or Reload on a page that a form POST created. This is the most common cause.
  • A response with Cache-Control: no-store. Chrome did not keep it, so there is no copy to show on Back.
  • A framework that adds no-store without anyone choosing it. PHP sessions do this by default (see the server section below), and login and admin areas of many applications send no-store too.
  • A Vary header that no longer matches. If a request value the response varies on, such as a cookie, changed after the page was stored, Chromium treats the stored copy as a mismatch.
  • A cache that was cleared or cannot be used: browsing data deleted after the submit, a full disk, or security software that locks files in the Chrome profile folder.
  • An extension that changes headers or manages the cache. Testing in a private window shows whether an extension is involved.
  • An Android WebView with the cache mode LOAD_CACHE_ONLY, or with network loads blocked. WebView blocks network loads by default when the app lacks the INTERNET permission.

Server-side causes and configuration

A site owner cannot clear a visitor's cache. Two things on the server decide whether the Back button works: how the form flow answers a POST, and which cache headers the pages carry.

Read the headers the page sends

Send the form with curl and print only the response headers:

curl -s -D - -o /dev/null -d 'name=test' https://example.com/submit
HTTP/2 200
content-type: text/html; charset=UTF-8
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache

The second block shows a response that causes the error, because no-store tells every cache to keep nothing. Check every layer that can add the header: the application, the web server (grep -rn "no-store" /etc/nginx/), the CDN rules, and any reverse proxy in front of the site.

Redirect after POST with 303

The most reliable fix is to change the flow, not the header. Answer the POST with a redirect to a normal GET page. The browser then stores a plain GET result, and Back and Reload never need to repeat the POST. This is the Post/Redirect/Get pattern, and the 303 See Other status exists for it. In Express:

app.post('/checkout', async (req, res) => {
  const order = await createOrder(req.body);
  res.redirect(303, `/orders/${order.id}`);
});

In PHP:

<?php
// ...process the form, then:
header('Location: /thanks', true, 303);
exit;

Keep a guard against double submits on the server, such as a one-time form token or a unique order key, because visitors double-click.

PHP sessions and other framework defaults

PHP's session.cache_limiter setting defaults to nocache. With it, session_start() sends Cache-Control: no-store, no-cache, must-revalidate on every page that starts a session. The PHP manual lists private_no_expire as the alternative that sends Cache-Control: private, max-age=... (the lifetime comes from session.cache_expire, 180 minutes by default). Setting the limiter to an empty string turns the automatic headers off, so you can send your own:

<?php
session_cache_limiter('');   // stop PHP from adding its own cache headers
session_start();
header('Cache-Control: private, no-cache');

private, no-cache lets the browser keep a copy but requires validation before it reuses the copy for a normal load. Use it only for pages that are safe to keep on the visitor's disk. Pages with account details or payments should keep no-store. The price is that Back on those pages cannot show a saved copy, which is another reason to use the redirect above.

Android WebView

Two settings in an Android app produce the error. First, the manifest needs the INTERNET permission. The Android documentation says that setBlockNetworkLoads defaults to true when the app does not have it, and Chromium turns that setting into a cache-only load:

<uses-permission android:name="android.permission.INTERNET" />

Second, check the cache mode. The documentation describes LOAD_CACHE_ONLY as "Don't use the network, load from the cache", so every page that is not cached fails with ERR_CACHE_MISS:

val settings = webView.settings
settings.cacheMode = WebSettings.LOAD_DEFAULT          // cache when valid, else network
// Offline-friendly: cached copy even if expired, otherwise the network
// settings.cacheMode = WebSettings.LOAD_CACHE_ELSE_NETWORK
settings.blockNetworkLoads = false   // throws SecurityException without the permission

Frameworks that render pages with an Android WebView follow the same Android rule. The Flutter documentation, for example, says Android apps must declare their use of the Internet in AndroidManifest.xml.

How it looks from the outside

ERR_CACHE_MISS comes from the browser of one visitor, so an external check does not reproduce it. What a check shows is whether the page itself was healthy at that moment. Compare these patterns:

  • Every checkpoint gets the page, but visitors see the error after Back. The server is fine, so look at the form flow and at the cache headers.
  • Reports start right after a deploy or a CDN change. A new rule or a framework update probably added no-store. Compare the headers from the origin and from the public address with curl -I.
  • Only users of your Android app report it. The cause is in the WebView settings of the app, not on the server.
  • The page also fails from the checkpoints. That is a different problem, and the "This site can't be reached" guide is the place to start.

The HTTP checker checks a host's HTTP status, response time and server availability from locations worldwide, which confirms the first case quickly.

How to fix ERR_CACHE_MISS

If you are a visitor

  1. Do not use Back to return to the result of a form. Open the page again from the site's menu or type the address. That sends a normal GET request.
  2. Think before you resubmit. Reload sends the form data again. That is fine for a search or a sign-in. For a payment, an order or a comment, first check the order history or the site itself to see whether the first submit worked.
  3. Try a private window. Press Ctrl+Shift+N (Windows, Linux) or Cmd+Shift+N (macOS). Extensions are off there unless you allowed them. If the error is gone, turn extensions off one by one in chrome://extensions.
  4. Clear cached files. Press Ctrl+Shift+Delete (Cmd+Shift+Delete on macOS), choose "Cached images and files", and clear. This helps when the cache is damaged, but it cannot bring back a page you already left.
  5. Free disk space and restart Chrome. A full disk can leave the browser without a working cache.
  6. Update Chrome in chrome://settings/help, then try again.
  7. In an Android app, update the app and, if your device lists it, Android System WebView in Google Play, and make sure the app is allowed to use mobile data and Wi-Fi.

If you run the site

  1. Find out which page the visitors come from. If it is the result of a form, change the flow to Post/Redirect/Get with a 303.
  2. Read the headers with the curl command above and remove no-store from pages that do not need it.
  3. Check framework defaults, such as the PHP session limiter, the CMS caching plugin settings and the CDN rules.
  4. For an Android app, add the INTERNET permission, set a cache mode other than LOAD_CACHE_ONLY, and log onReceivedError for the main frame.
  5. Test again in a clean Chrome profile: submit the form, press Back, and check that you reach a normal page.

What monitoring can and cannot show

A monitor does not press the Back button, so it cannot see ERR_CACHE_MISS. It shows whether the site was up when a visitor tried. HostTracker checks websites from 300+ checkpoints in 158 cities and alerts by email, SMS, voice call, Slack, Telegram and more. If all checkpoints were green while a visitor reported the error, the server was healthy, and the cause is in the headers, the form flow or the visitor's browser.

Frequently asked questions

Is ERR_CACHE_MISS a problem with the website?

Usually not. It is a message from the browser. A site can make it more common by sending no-store on form results or by answering a POST with a page instead of a redirect, but the site itself is not down.

Is it safe to click Reload on "Confirm Form Resubmission"?

It sends the same form data again. For a search, that is harmless. For an order, a payment or a message, the action can happen twice. Check the site's own history first.

Will clearing the cache fix ERR_CACHE_MISS?

Only when the cache itself is damaged. If the error comes from Back after a form, clearing the cache removes the entries you would need, so open the page again instead.

Why do I only see this in Chrome?

Other browsers handle the same situation with their own messages, and they have their own rules for storing and reusing form results. The Chrome code ERR_CACHE_MISS belongs to the Chromium network stack, which is why Edge, Brave and Opera show it as well.

Why does my Android app show net::ERR_CACHE_MISS?

The WebView was told to use only its cache. The usual reasons are a missing INTERNET permission, which blocks network loads by default, and the cache mode LOAD_CACHE_ONLY. Fix the permission or the mode and reload.

How do I stop my visitors from seeing it after a form?

Answer the POST with a 303 redirect to a result page that loads with GET. Then Back and Reload work on a normal page and never ask for resubmission.

Is "Confirm Form Resubmission" the same as ERR_CACHE_MISS?

Yes. It is the special page Chrome shows for ERR_CACHE_MISS when the failed page came from a POST. The code is printed at the bottom of that page.

Sources and further reading

Sprawdź teraz

Uruchom darmowe sprawdzenie na swojej stronie - bez zakładania konta.

HTTP check

Monitoruj to na stałe

Otrzymasz powiadomienie w chwili awarii: HostTracker sprawdza z ponad 300 lokalizacji i powiadamia e-mailem, SMS-em, przez Slack, Telegram i nie tylko.

Funkcje HostTracker

Więcej w tej sekcji: Napraw to: poradniki na błędy, które naprawdę się zdarzają