`window.name` not persistent with file:/// protocol using Firefox

34 views Asked by At

I am trying to have a javascript variable persistent across pages under the same domain. It works well using localStorage. But it does not work for local files using the file:/// protocol, as this storage is persistent only in a given folder. I tried with sessionStorage with the same result.

Instead, I tried to use window.name as it is supposed to be persistent in the same window, even when the domain changes. I thought it would thus persist across folders using the file:/// protocol. But it does not in Firefox 119! For some reason it persists upon reload, but not if I switch forth and back to another page. And it works properly on Chrome 119!

Is this expected? Is there a workaround?

0

There are 0 answers