After opening Waterfox 6.5 (Firefox 128 ESR) back up (days or hours later) the session for my website is expired. However now the browser saves the DOM state and this leads to literally every form and link breaking. I do not know what this feature is called, let alone how to disable it for my website.
<link rel="prefetch" />
.I'd describe the behavior as:
The best answer allows me to outright disable this saved-DOM-state feature (bug in my case) outright forcing the browser to actually load when the browser is restarted and the user goes back to a previously opened my tab. It should be blatantly obvious I need to deploy this answer from the website as in explicitly not disabling the browser feature via about:config as I can obviously not ask every visitor to change their browser configuration.
A lower-grade though still acceptable answer is the ability to at least detect a saved-DOM-state and forcibly reloading the page. I use localStorageenter code here
If no one can determine a way to outright disable this (per URL or an entire domain name) through the website (NOT using about:config for very obvious reasons) then I need to file a bug report with specific references and the name of this feature so I can draw attention to this bug over at Mozilla.
What is the name of this feature and how do I disable it per URL from my website (not the browser configuration!)?
While the answer can not be to change the browser profile an answer might be able to be derived from it:
prefs.js
file.With the differences highlighted it may be easier to find the preference. With the preference name then much more effective searching can be done to determine how to disable this from the website end of things.
Comparing the browser configurations of 115 ESR and 128 ESR failed to produce anything except things of minor relevance. I then starting going the release notes for the superfluous versions 116 through to 128 itself. On 119's documentation page I found the following:
Recently closed tabs now persist between sessions that don't have automatic session restore enabled. Manually restoring a previous session will continue to reopen any previously open tabs or windows.
No references any where however. I then performed the following searches:
Which then led me to https://developer.mozilla.org/en-US/docs/Glossary/bfcache and then https://web.dev/articles/bfcache. I then implemented the window.onunload
event listner, typed "123" in to the search input, switched away from the jabcreations.net test domain tab and restarted the browser. Unfortunately the "123" text in the form field still appeared.
The problem of outright storing the exact DOM state was going an entirely new step beyond simply loading from cache. That being said this thread (How to prevent content being displayed from Back-Forward cache in Firefox?) led me to looking at cache related HTTP headers. I updated my header to the following:
Cache-Control: no-store
I then went back to the test website, modified the search form field to "123", switched to another tab, restarted the browser and went back to the test tab; it reloaded from scratch.