# Navigating to local URL fragment doesn't modify browser history

**URL:** https://meta.discourse.org/t/navigating-to-local-url-fragment-doesnt-modify-browser-history/155624
**Category:** Support
**Created:** [June 22, 2020, 9:35pm UTC](https://meta.discourse.org/t/navigating-to-local-url-fragment-doesnt-modify-browser-history/155624 "2020-06-22T21:35:49Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![gar1t](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gar1t/32/380142_2.png) [@gar1t](https://meta.discourse.org/u/gar1t)
#### Post date: [June 22, 2020, 10:04pm UTC](https://meta.discourse.org/t/navigating-to-local-url-fragment-doesnt-modify-browser-history/155624/3 "2020-06-22T22:04:20Z")

</div>

I find this behavior extremely unexpected 🙂

Here’s a sample page with no JavaScript. On Chromium, clicking that link takes you to the bottom of the page. Clicking back takes you back to where you clicked from. That’s expected behavior that you’ll see on every other website that doesn’t eat this history.

```html
<a href="#target">link</a>

<div style="height:2000px"></div>

<div id="target">Hello</div>

```

I assume Discourse is handling URL fragments in JavaScript by scrolling to the location and therefore the history would have to be explicitly pushed.

@codinghorror expresses a strong and final opinion about this [here](https://meta.discourse.org/t/push-browser-history-when-navigating-within-a-topic/109613/6). It’s surprising to see such a strong opinion about a change to standard web browser behavior. In fairness I haven’t yet used Discourse for heavy duty topic navigation and therefore can’t appreciate the obviousness of his argument.

I’m using Discourse in part for [documentation](https://my.guild.ai) and this behavior is extremely disruptive to the point that I’m afraid to click a link and lose my place on a page.

---

_[View the full topic](https://meta.discourse.org/t/navigating-to-local-url-fragment-doesnt-modify-browser-history/155624)._
