What are those URL's that are starting with //

2020-02-14 03:37发布

问题:

Hi can somebody please explain what are the URL's that we can see at Google+ HTML source code that look like <img src="//lh5.googleusercontent.com/--kKi9nRc78s/AAAAAAAAAAI/AAAAAAAAAC8/w1PSeKZtt7I/photo.jpg?sz=48" alt="" />

Is it a shortcut for http:// ?

What browsers understand it in this case, where can I find more information on this, please ?

Thanks in advance!

回答1:

It's a scheme-relative URL. You see this often on websites/pages which can be served over both http and https. If the image pointed to a http resource and the page itself was served over https, you would otherwise see an annoying browser warning that unsecured content is been served, something like this:



标签: http url