MantisBT - NetSurf | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0002928 | NetSurf | [All Projects] General | public | 2026-11-21 08:52 | 2026-11-21 08:52 |
| Reporter | Jeremy Visser | ||||
|---|---|---|---|---|---|
| Assigned To | |||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | Tested on GTK and Framebuffer | OS | Linux (Fedora 45, Rocknix) | OS Version | |
| Product Version | 3.11 | ||||
| Target Version | Fixed in Version | ||||
| Fixed in CI build # | |||||
| Reported in CI build # | |||||
| URL of problem page | |||||
| Summary | 0002928: browser_window: back history breaks on meta redirect | ||||
| Description | If a website uses a meta http-equiv redirect, it is impossible to return to the redirection target page with the Back button. This is because browser_window_refresh() sets the BW_NAVIGATE_HISTORY flag with the opposite logic to what is needed. BW_NAVIGATE_HISTORY tells the browser to create a history entry, i.e. one that can be returned to with the Back button. A meta redirect that sends you to a different page should obviously have a history entry created for that target. However, what browser_window_refresh() ends up doing is only setting BW_NAVIGATE_HISTORY when the meta redirect target is the same URL, which is completely the opposite of what we want. | ||||
| Steps To Reproduce | 1. Navigate to refresh.html, which contains: <meta http-equiv="refresh" content="0;url=target.html"> 2. target.html loads, which contains: <a href="other.html>other.html</a> 3. Click link (other.html), and press Back 4. - Expectation: back to target.html - Reality: back to refresh.html - If refresh.html is random (i.e. subsequently redirects to target2.html), it will be impossible to go back to target.html - If refresh.html is static (e.g. in a reproduction case), you will still end up on the intended destination (after an extra page load). But in this case, it is incorrect to conclude that you have failed to reproduce the bug; rather, you have failed to reproduce the *test*. Reproduced on git commit daf380d279b2818e3b1f226bc5ec00dfa25bff8c. | ||||
| Additional Information | A suggested fix is attached, although feel free to fix it differently if you prefer, or if I've made a mistake. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=785&type=bug | ||||
| There are no notes attached to this issue. |
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
|---|---|---|---|---|---|
| 2026-11-21 08:52 | Jeremy Visser | New Issue | |||
| 2026-11-21 08:52 | Jeremy Visser | File Added: fix-meta-redirect.patch | |||