-1

I am wondering why some starts with "//"? Is it a shortcode for "http://"? E.g On the HTML5 boilerplate, I see the inclusion of the jQuery library as follows:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

Can I use // instead of http:// on any sites or do I need to pay for this service extra?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Suthan Bala
  • 3,209
  • 5
  • 34
  • 59
  • possible duplicate of [Two forward slashes in a url/src/href attribute](http://stackoverflow.com/questions/9646407/two-forward-slashes-in-a-url-src-href-attribute) – Quentin Sep 11 '13 at 15:50

1 Answers1

1

Starting with // means you keep the protocol.
If you are serving pages both as http and https this is handy as to not change the protocol when linking.
Read more at https://stackoverflow.com/a/9646435/521554

Community
  • 1
  • 1
LosManos
  • 7,195
  • 6
  • 56
  • 107