Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Anchor doesn't update browser history

Ryota Hashimoto
Contributor
July 16, 2020

Hi,

When visiting a page which has anchor links, clicking it, then pushing Backspace will take me previous page, not the anchor link on the page.  How can I go back to the link instead of back to the previous page? 

Thanks,

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2020

Hello @Ryota Hashimoto !
As I understand, after clicking two or more anchors within the same page, click back or using the backspace to go back goes back to the previous page, not the previous anchor.

Since the browser history and navigation is not managed by Confluence but by the browser itself, Confluence little to no power over how the history cache is managed.

While testing this behavior, I was able to confirm that Browser history does update each time I clicked in a different anchor.

However, even with the history being updated with each click on the anchors, the browser took me back to the previous page when I clicked back or used the backspace button to try to get back into the previous anchor.

Depending on which browser you are using, I believe that the best approach is to reach to their community or support and check about this behavior:

Let us hear from you!

Ryota Hashimoto
Contributor
July 21, 2020

Hi Diego, thank you for your answer. 

Now I have changed my mind, don't intend to argue something but just want to know the Confluence spec (not browser spec, please refer to below). 

With vanilla HTML with anchor link (simple HTML A element with href attribute with fragment to the anchor) to the anchor at the bottom of the page, major browsers (I've tested Chrome, Safari and Firefox) will bring me to the bottom, and Backspace (or history back) will give me the original place of the page, not previous page. 

But I know it's also depends on application implementation eg. utilizing pushState() etc to avoid such behavior.  And the Confluence case, it works as you've explained.  I understand that as a spec and use this as is.  Thanks a lot. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events