Open Bug 748294 Opened 13 years ago Updated 3 months ago

remove support for Link HTTP header

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
macOS
defect

Tracking

()

People

(Reporter: annevk, Unassigned)

Details

(Whiteboard: Opera: CORE-45978,domcore-bugbash-triaged)

The Link HTTP header is a nice trick to add a style sheet to a page, but in the end: * only Opera and Gecko support it * we have several open bugs on it * it's much better if authors use the <link> element instead * it keeps coming up and consuming time which is better invested elsewhere
Whiteboard: Opera: CORE-45978
I agree that we should remove support. I think Link headers are used so rarely that it's not justified to have as much code for them as we have and to keep maintaining and reviewing that code. zcorpan found 7 style sheet Link headers (and a bunch of content self-rating stuff) in the 2009 dotbot dump that contains somewhere between 400000 and 600000 pages. http://simon.html5.org/dump/link-headers.txt The Link header has been around years in Gecko and Opera, but e.g. WebKit has gotten away with not supporting it. I don't see a reason to expect that to change and I don't see a big win from having Link even if WebKit and Trident eventually added support.
(In reply to Anne van Kesteren from comment #0) > The Link HTTP header is a nice trick to add a style sheet to a page, but in > the end: > > * only Opera and Gecko support it > * we have several open bugs on it That is not true for Mozilla, as far as I can tell. > * it's much better if authors use the <link> element instead That does only work for HTML. > * it keeps coming up and consuming time which is better invested elsewhere
(In reply to Henri Sivonen (:hsivonen) from comment #1) > The Link header has been around years in Gecko and Opera, but e.g. WebKit > has gotten away with not supporting it. I don't see a reason to expect that > to change and I don't see a big win from having Link even if WebKit and > Trident eventually added support. I agree it's not used a lot, but it *is* used. Are you proposing to have every feature removed that isn't used a lot?
(In reply to Julian Reschke from comment #3) > Are you proposing to have > every feature removed that isn't used a lot? No. The Link header isn't just used "not a lot". It's used extremely rarely. When it comes to removing features that are used extremely rarely, it's relevant to consider how much code they involve, whether they are supported by all browsers, what level of effort is needed to keep the feature around, who is using the feature and the age of the feature (whether it's something that has recently been introduced that isn't used yet or whether it's something that's been around for a decade and still isn't used), etc.
a) The Link header field didn't have a proper spec until 18 months ago; since quite a few conformance problems have been fixed in Firefox. b) I see mentions of Link header field usage in Chromium as well; maybe just not for stylesheet load (which is just one of many potential uses); see <http://www.chromium.org/spdy/link-headers-and-server-hint> and <http://dev.chromium.org/spdy/link-headers-and-server-hint/link-rel-subresource>
intentional breakage should heavily take product team input - who is doing blizzard's role now? for my part, link header maintenance is not a problem so I don't see a lot of upside to this change.
None of the Link header code lives in necko anyway. This is all DOM stuff.
Component: Networking: HTTP → DOM
QA Contact: networking.http → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3

https://caniuse.com/mdn-http_headers_link shows that all browsers support this.

Whiteboard: Opera: CORE-45978 → Opera: CORE-45978,domcore-bugbash-triaged
You need to log in before you can comment on or make changes to this bug.