Performance and RFCÂ 2396
Published on Feb 18, 2009 (updated Feb 5, 2024), filed under development, performance (feed). (Share this on Mastodon or Bluesky?)
This and many other posts are also available as a pretty, well-behaved ebook: On Web Development.
RFCÂ 2396 specifies that relative URIs like //foo
get resolved as http://foo
. This means, if you link a resource like https://example.com/
, @href
may as well just point to //example.com/
.@src
couldn’t start with //
.
This has two advantages: You can avoid security alerts when juggling with and switching between http and https, and you can save a couple of characters per URI reference. But I’m saying that just to inspire performance critics who already and with great joy discussed general advantages of HTML, including omitting optional tags.
Since this part of RFC 2396, seen as a whole, is still relatively new to me feel free to add to this. I’m just curious and love experimenting. So after I verified that all major browsers support the //
syntax I actually created a “honeypot” test page to see whether that page gets indexed properly by search engines. Watch this space for the findings.
Update (February 28, 2009)
As it seems, all major search engines followed the “hidden” links to the RFC 2396/3986 test page I set up: Google was first, Yahoo, Microsoft’s Live Search, and Altavista followed over the last days. There’s a slim chance that the test might have been compromised, but there are no indicators whatsoever solidifying that concern.
Update (June 28, 2013)
We’ve found this approach so useful, it’s common practice now.
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve been working as a technical lead and engineering manager for companies you’ve never heard of and companies you use every day, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)