Force page reload with html anchors (#) - HTML & JS
- by yuval
Say I'm on a page called /example#myanchor1 where myanchor is an anchor in the page.
I'd like to link to /example#myanchor2, but force the page to reload while doing so.
The reason is that I run js to detect the anchor from the url at the page load.
The problem [normally expected behavior] here though, is that the browser just sends me to that specific anchor on the page without reloading the page.
How would I go about doing so (JS OK).
Thanks!