# Hash/anchor in url prevents further url updates

**URL:** https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068
**Category:** Support
**Created:** [7월 4, 2019, 5:31오전 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068 "2019-07-04T05:31:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nickvaneijk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nickvaneijk/32/140936_2.png) [@nickvaneijk](https://meta.discourse.org/u/nickvaneijk)
#### Post date: [7월 4, 2019, 5:31오전 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/1 "2019-07-04T05:31:27Z")

</div>

On our discourse powered website we have a separate section which links to certain headings using an anchor/hash in the url, [https://mysite.com/my-page#faq](https://mysite.com/my-page#faq)

When a user follows this link, the url is updated to that value, but navigating further no longer updates the url.

Is there a reason why the hash prevents any url updates? This currently breaks our app after some links in our app, eg ‘understand.html#understand’

This behavior can also be seen on any discourse powered forum, with a minimal reproducible example below.

1. go to [https://meta.discourse.org/](https://meta.discourse.org/)
2. append #foo to the url, so: [https://meta.discourse.org/#foo](https://meta.discourse.org/#foo)
3. Click on any topic, you will see the url does not update

Thanks in advance!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [7월 4, 2019, 6:58오후 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/2 "2019-07-04T18:58:51Z")

</div>

I think this one involves some Javascript debugging and would be best suited for @j.jaffeux.

The issue here is that our router uses hashes in some URLs (in particular, jumping to parts of posts, and I believe faq does it too.) I assume when it’s not a hash we know about somehow it’s breaking stuff, when we should be able to ignore it.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 10, 2019, 8:45오전 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/4 "2019-07-10T08:45:55Z")

</div>

@eviltrout I think that should do it:

[https://github.com/discourse/discourse/pull/7872](https://github.com/discourse/discourse/pull/7872)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 10, 2019, 6:48오후 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/5 "2019-07-10T18:48:47Z")

</div>

Merged!
