Iframe keep reloading in firefox, when updating hash value using window.location.hash
14:59 13 May 2026

Im trying to update the hash value of my iframe page, by setting value to window.location.hash= 'hash/value/for/section'

But, once the hash set, the iframe starts reload. then landing the page, again -> hash update -> reload.

moving to a different section of the page, the page does not reroute to that section; instead, it loads from the beginning and lands on the chosen section.

Im using hash value without '#'. Because while settings browser ignores leading "#". Ref: https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-hash-dev

In chrome its working fine. If occur only in firefox browser. Does anyone faced this kind of issue? or anyone know cause or solution for this issue?

Unfortunately, Im unable to provide sample app for now. If its really needed, will create one sample app and share

Firefox version: 150.0.2. Mac 64 bit

javascript firefox iframe hash navigation