MantisBT - NetSurf
View Issue Details
0002928NetSurf[All Projects] Generalpublic2026-11-21 08:522026-11-21 08:52
ReporterJeremy Visser 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformTested on GTK and FramebufferOSLinux (Fedora 45, Rocknix)OS Version
Product Version3.11 
Target VersionFixed in Version 
Fixed in CI build #
Reported in CI build #
URL of problem page
Summary0002928: browser_window: back history breaks on meta redirect
DescriptionIf 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 InformationA suggested fix is attached, although feel free to fix it differently if you prefer, or if I've made a mistake.
TagsNo tags attached.
Attached Filespatch fix-meta-redirect.patch (2,114) 2026-11-21 08:52
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=785&type=bug

There are no notes attached to this issue.

Issue History
2026-11-21 08:52Jeremy VisserNew Issue
2026-11-21 08:52Jeremy VisserFile Added: fix-meta-redirect.patch