why do I keep seeing “//” instead of “http://” for

2019-06-23 17:33发布

问题:

I saw more an more Javascript files and pictures and CSS loaded like this:

src="//somepath"

instead of

src="http://somepath"

What is this and what does it mean? Is there any documentation to it?

Thanks!

回答1:

This is called protocol-relative URLs. Paul Irish has written a nice blog post about it.