# URLのハッシュ/アンカーがそれ以降のURL更新を妨げる

**URL:** <https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068>\
**Category:** Product Support\
**Created:** [2019 年 7 月 4 日午前 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:** 1\
**Showing post:** 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:** [2019 年 7 月 4 日午前 5:31 UTC](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/1 "2019-07-04T05:31:27Z")

</div>

Discourse 搭載のウェブサイトでは、URL のアンカー（ハッシュ）を使用して特定の見出しにリンクする別セクションがあります。例：[https://mysite.com/my-page#faq](https://mysite.com/my-page#faq)

ユーザーがこのリンクを開くと、URL はその値に更新されますが、その後の移動では URL が更新されなくなります。

ハッシュが URL の更新を妨げる理由はあるのでしょうか？この問題により、アプリ内の一部のリンク（例：‘understand.html#understand’）を踏んだ後にアプリが破損してしまいます。

この動作は、Discourse 搭載のフォーラムでも確認できます。最小限の再現例を以下に示します。

1. [https://meta.discourse.org/](https://meta.discourse.org/) にアクセス
2. URL に #foo を追加：[https://meta.discourse.org/#foo](https://meta.discourse.org/#foo)
3. 任意のトピックをクリックすると、URL が更新されないことが確認できます

ご多忙の折とは存じますが、ご回答いただけますと幸いです。

---

_[View the full topic](https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068)._
