brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Link to a specific line in Firefox's view-source

Firefox
~/tips/tip-firefox-view-source-line-anchor

view-source:https://www.mozilla.org/#line100

Opens a page's source at a given line using a #line anchor.

You can see a page’s HTML source by putting a prefix in front of its address. Few people know that Firefox lets you jump to a line the same way.

Type this in the address bar:

view-source:https://www.mozilla.org/#line100

The view-source: prefix opens the source of the page and the #lineNNN part scrolls to that line. Both are in the Firefox source docs. You can paste such a link in a bug report so a colleague lands right at the problem.

Inside the source tab there’s also a Go to Line command (Alt+Shift+L, or Ctrl+Option+L on macOS) and toggles for wrapping long lines and syntax highlighting. With highlighting on, parse errors are marked in red, which helps find broken HTML. If you select part of a page and right-click, View Selection Source shows only that part.

Caveat: the source is what the server sent. Anything a script added later is in the Inspector, not here.

The same prefix works for any address you can open, so view-source: in front of a feed or a JSON URL shows the raw response. That is useful for checking markup or a sitemap without a download.

Further reading: View Source in Firefox

More Firefox tips ^ invoice history about:processes right-click the request > Edit and Resend Windows and Linux: Ctrl+B Inspector > click the "grid" badge All Firefox tips (10) All topics

Link