Hacker News new | ask | show | jobs
by pdappollonio 3462 days ago
Originally when you don't add the protocol, the link should end up relative to the domain that's checking the email. Say you're checking your e-mail at:

  https://mail.google.com/mail/u/0/#inbox/123456abcdef
... Then your link without protocol should end up being:

  https://mail.google.com/mail/u/0/example.com/building/show/123
... which doesn't exist as a website (I removed everything including the # character since that's for SPAs). So Gmail is being a little bit smarty by assuming you did something wrong in your e-mail so the link should point to the url example.com/building/show/123 with the protocol included. IMHO iCloud and Outlook have the proper behavior by not recognizing the link as an actual link since it's missing the protocol.
1 comments

I thought the absence of the domain resulted in that behavior. Checked it out in JSBin [0] and well I'll be damned. Thanks for the explanation.

[0] - http://jsbin.com/mowacanuwa/edit?html

Yeah, not having protocol is the problem. Now, you can also create links without the protocol part up to the colon, and the browser will autocomplete based on if you're visiting the website with or without SSL (HTTPS).

Here's a nice example (with a more complete explanation): http://jsbin.com/cexaqoviso/edit?html,output