What does `//` in javascript's src attribute do?

facebook, html, javascript, src, unix

Solution

This is a "protocol-relative" link. It uses http or https depending on what was used to load the current page.

Problem

I'm using Facebook's javascript sdk and it has double forward slashes. What do they mean? `<script src="//connect.facebook.net/en_US/all.js"></script>` I know a single `/` means root directory, but what is `//`? Is that telling the source to use `http://` and then the path?

Original source

Related problems