links in view-source no longer show a protocol




View Source
2 years ago
2 years ago


(Reporter: froydnj, Unassigned)


Firefox Tracking Flags

(Not tracked)




2 years ago

1. Open (or any website)
2. View source.

Expected results:

Elements with links (<link href>, <a href>, <script src>, etc.) display the full web address.

Actual results:

Elements with links no longer display a protocol:

<link rel="alternate" hreflang="x-default" href="//" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="//">

although hovering over the links seems to indicate that the links would go to the right place, and copying the link address from the context menu seems to work.  Copying and pasting text directly from view-source, however, is broken, as you don't get functioning HTML.  The lack of protocols also looks flat-out weird if you do know HTML.

I suspect this is fallout from bug 1172165, but I haven't confirmed that.

Comment 1

2 years ago
Hi Nathan ,

I tried to find a regression range by following the STR and I found that those links have no protocol displayed even in Firefox 2.0. Also worth mentioning that the same behavior appears on Chrome, Edge and Opera.
Keywords: regression, regressionwindow-wanted
I believe this is working as expected:

// is a protocol relative URL, which uses http: or https: depending on how the containing document is loaded.  It's suggested to web developers as a way to avoid mixed content issues on secure pages while also avoiding the supposed expense of https for non-secure documents.  (This is probably outdated advice at this point and should just be secure all the time, but anyway...)

Here's one of the articles that pushed people to use this approach back in the day: (Even this article has been updated to say just use secure all the time!)

If you view source on some other page like, you should see other link styles present there.

Feel free to reopen if I have misunderstood.
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.