Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which browsers support "//" instead of "http://" and "https://"? [duplicate]

Tags:

http

https

Possible Duplicate:
Is it valid to replace with // in a <script src=“…”>?
Absolute URLs omitting the protocol (scheme) in order to preserve the one of the current page

I can't find anything about this in Google - it's hard to find something about "//" :)

Anyway please tell, which browsers support "//" instead of "http://" and "https://"? I'd like to use this to include images, script, styles etc. But is it safe? Is there a browser that doesn't support this and I need provide a protocol?

like image 591
pronngo Avatar asked Apr 16 '12 12:04

pronngo


1 Answers

All browsers support it, it's safe - RFC 3986 Section 4.2 (or view txt version of RFC3986 and go to 4.2) specifies use of the protocal relative url and it is utilised in the HTML5 Boilerplate where there have been no reported issues with the technique. If there was a problem with using this cross-browser, the community would have picked it up by now.

Edit: Even WikiMedia use it

like image 108
Josh Davenport-Smith Avatar answered Oct 01 '22 18:10

Josh Davenport-Smith