TIL: The protocol-relative URL

The protocol-relative URL – Paul Irish.

Leave off the http: or https: if you have a resource that can be called over both secure and non-secure means.


Posted

in

by

Comments

One response to “TIL: The protocol-relative URL”

  1. Samuel A. Falvo II Avatar
    Samuel A. Falvo II

    Warning — I’m grumpy today.

    Problem: what’s to prevent software from just turning any old link-like-thing into a bogus link? Imagine how annoying it’d be for a blog engine or other hyperlink aware application to turn something like 2014/may/7 into a hyperlink.

    Call me old fashioned, but this is unacceptable. URLs are by definition required to have a protocol associated with them. It’s right in the RFC.

    I have a better idea — get off your butts and migrate everything to run under https:, and then you can affix https: to all your URLs, uniformly. Problem solved AND the RFC retains its relevance.

Leave a Reply

Your email address will not be published. Required fields are marked *