Links to fragments of a page

A special type of link, which contains a # symbol, can link to part of a page. For example if you click this link, it will scroll down to the “History” part of a Cake page on Wikipedia:

https://en.wikipedia.org/wiki/Cake#History

There are two parts to this link:

  1. The first part – what appears before the # – is the page we linked to.
  2. The second part – after the # symbol – is a fragment identifier, and it tells the browser to scroll down to the History part of the page.

Understanding this is key to understanding certain kinds of broken links that can be reported by Silktide.

How Silktide considers links to fragments broken

Say you link to a page fragment like above, but you make a mistake in the fragment identifier (the second part of the link), by spelling “History” with an extra “y”:

https://en.wikipedia.org/wiki/Cake#Historyy

If you click this link, it will take you to the Wikipedia page on Cake, but it won’t scroll down to the History part of the page, because that part of the link is wrong.

Silktide considers links like this to be broken, albeit less severely then if the link failed to take the user to a page at all.

Understanding links you may not think are broken

Sometimes a website will contain links to fragments that make no sense to you – for example, they might have a fragment identifier like !, e.g.

https://en.wikipedia.org/wiki/Cake#!

This kind of link could be a mistake – as it doesn’t work as expected when clicked – or it could be a side effect of how the page was programmed. Some developers define links with fragments, and then override those links with JavaScript so most people won’t experience them. This is a common but discouraged practice.

It is discouraged because their links are still seen in many places, where they will be broken:

  • Search engines
  • Users with accessibility aids, e.g. screen readers
  • Users who open links in new tabs (e.g. Ctrl + click on a link)
  • Users with JavaScript disabled

In practice while such links are discouraged, most users would not consider them broken, and you may wish to ignore these particular links manually.

Need more help?