luci-base: root index.html redirect is cached - meta http-equiv Cache-Control is invalid

Open Beginner friendly
#8,911 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
html
Domain
frontend

Research direction

Start by locating the root /index.html shipped by luci-base and inspect how its response is served. Choose either a real HTTP redirect or response headers that prevent caching, then reproduce the hostname and browser-cache steps to confirm the redirect is not served without a network request.

Written by the indexing model from the issue text.

Description

Is there an existing issue for this?
  • I have searched among all existing issues (including closed issues)
screenshots or captures

No response

Actual behaviour

The root /index.html shipped by luci-base redirects to /cgi-bin/luci/ via a meta refresh and attempts to prevent caching with pragmas.

These have no effect! Cache-Control, Pragma and Expires are not pragma directives in the HTML Standard. Firefox and Chrome ignores them.

A 200 with Last-Modified but no Cache-Control/Expires is eligible for heuristic freshness (RFC 9111 §4.2.2).
Browsers compute ~10% of the time since Last-Modified; Firefox caps this at one week, Chromium does not cap it.
Since index.html's mtime is the image build date, the gap grows over the device's lifetime and the heuristic lifetime saturates at the cap almost immediately.

The meta refresh fires immediately, so Ctrl+Shift+R is not usable for refresh.

Expected behaviour

Redirect is not cached.

Option A: Return a real HTTP redirect instead of a meta refresh. A 302 Found is not cacheable, that fixes this without needing a Cache-Control header at all.

Option B: Emit Cache-Control: no-store on the response headers.

meta redirect is also reported in #7064 as usability issue

Steps to reproduce
  1. Make some hostname to point to the router.
  2. Visit that hostname in Firefox once.
  3. Restore normal DNS resolution.
  4. Visit the hostname again — the cached LuCI redirect is served without any network request. Confirm via about:cache?storage=disk.

Response from cache:

HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=20
ETag: "ccc-25c-682552a4"
Last-Modified: Thu, 15 May 2025 02:34:12 GMT
Date: Tue, 04 Aug 2026 00:20:58 GMT
Content-Type: text/html
Content-Length: 604

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "[http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">](http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd%22%3E)
<html xmlns="[http://www.w3.org/1999/xhtml">](http://www.w3.org/1999/xhtml%22%3E)
    <head>
        <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
        <meta http-equiv="Pragma" content="no-cache" />
                <meta http-equiv="Expires" content="0" />
        <meta http-equiv="refresh" content="0; URL=cgi-bin/luci/" />
        <meta http-equiv="Content-Security-Policy" content="default-src 'none'; form-action 'none'">
    </head>
    <body>
        <a href="cgi-bin/luci/"></a>
    </body>
</html>
Additional Information
Cudy WR3000S
What browsers do you see the problem on?

Firefox

Relevant log output

Dominant language
JavaScript
Stars
7.9k
Forks
2.9k
Avg merge
4d 5h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/luci

All issues in openwrt/luci

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.