luci-base: root index.html redirect is cached - meta http-equiv Cache-Control is invalid
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
- Make some hostname to point to the router.
- Visit that hostname in Firefox once.
- Restore normal DNS resolution.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openwrt/luci
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·