Page 1 of 1

Wikipedia link format ?

Posted: Thu Oct 13, 2011 1:48 pm
by conradk
Hey,
DOes anybody know why HTML generated by wikipedia creates links like;
<a href="//es.wikipedia.org/">Link name</a>
What is the doubleslash before the URL all about ?

Thanks for any help you can offer :P

Best regards,
CK

Re: Wikipedia link format ?

Posted: Thu Oct 13, 2011 3:23 pm
by jacek
Might be a typo ;) I have seen this before though.

Re: Wikipedia link format ?

Posted: Thu Oct 13, 2011 4:10 pm
by conradk
Well, Twitter uses it too.

And PHP doesn't think this is a valid URL when using the FILTER_VALIDATE_URL, which is kind of idiotic IMO.

Anyways, thanks for answering :)

Re: Wikipedia link format ?

Posted: Thu Oct 13, 2011 6:12 pm
by libeco
I believe this can be used when you don't care whether http or https is used.

Re: Wikipedia link format ?

Posted: Thu Oct 13, 2011 11:27 pm
by jacek
libeco wrote:I believe this can be used when you don't care whether http or https is used.
That makes sense, but surly just / would do the same thing :?

Re: Wikipedia link format ?

Posted: Thu Jun 06, 2013 10:10 pm
by FrederickGeek8
jacek wrote:
libeco wrote:I believe this can be used when you don't care whether http or https is used.
That makes sense, but surly just / would do the same thing :?
I would if it is on the same server

// is used when you don't care whether it uses https or http. It defaults to what protocol you are currently using.