Anchor tag doesn’t work in iPhone Safari

Opera, IE, Chrome and Firefox will carry over the anchor to the new page. However, Safari loses the anchor on the redirect.

So what if you add / just before the ID Tag?

Old URL Path:
http://www.example.com/my-example-article-url-is-like.php#articlebottom

New URL Path:
http://www.example.com/my-example-article-url-is-like.php/#articlebottom

Another solution is that you’d have to delete both “www.” from the domain and add a forward slash before the anchor tag in the URL/pathname before Safari would respond properly. Firefox doesn’t seem to care, and I haven’t gotten to testing on IE yet.

just doing my due diligence and answering for anyone who is having this problem with Index navigation links on a Squarespace page and Safari on iOS. My anchor links were not working when formatted as such:

http://sitename.com/page#anchor

Then I tried this to no avail:

http://sitename.com/page/#anchor"

Rather than give up, light my computer on fire, and call it a day I tried:

http://www.sitename.com/page/#anchor

And it worked! So cheers if this helps anyone.

Leave a Comment