# Anchors url not purge when page changed

**URL:** https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484
**Category:** Bug
**Created:** [November 5, 2022, 10:37am UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484 "2022-11-05T10:37:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [November 5, 2022, 10:37am UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484/1 "2022-11-05T10:37:10Z")

</div>

Hello,

If I click an anchor on `/tos` page e.g.: feedback  
It will correctly add it to the url.

 ![Screenshot 2022-11-05 at 11.12.18](https://global.discourse-cdn.com/meta/original/4X/f/2/0/f205c9848422927f321874764a588e8fc67a34ee.png)

But if I navigate to an other page the url won’t change.

 ![Screenshot 2022-11-05 at 11.13.23](https://global.discourse-cdn.com/meta/original/4X/6/c/2/6c296231a958bc4a9eee2868f8e5f2d669b932ea.png)

It can cause issues if I navigate to an other page which also use anchors and when I click to these anchors it will redirect to the previous page. Or if I reload the site it also will redirect to the previous page.

On the video I click an anchor link and after that click an other anchor link on another page and it redirect to the previous page.

Thank you 🙂

---

<div class="post-metadata">

### Author: ![vincefrommtl](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@vincefrommtl](https://meta.discourse.org/u/vincefrommtl)
#### Post date: [November 5, 2022, 11:59am UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484/2 "2022-11-05T11:59:02Z")

</div>

Can replicate on my forum 🙂

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 6, 2022, 10:20pm UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484/3 "2022-11-06T22:20:01Z")

</div>

What a strange bug, thanks heaps for raising it, we will have a look over the next few weeks I have it flagged for internal triage.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 6, 2022, 9:38pm UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484/5 "2022-12-06T21:38:28Z")

</div>

This should be fixed now via: [FIX: URL fragments not purging (#19324) · discourse/discourse@57fe57e · GitHub](https://github.com/discourse/discourse/commit/57fe57e7ce0a2a4c5ac3ce54184473b32aa33fab)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 10, 2022, 1:00pm UTC](https://meta.discourse.org/t/anchors-url-not-purge-when-page-changed/244484/6 "2022-12-10T13:00:01Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
