• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

what does "//" prefix mean in a src=

Twitter provides a link to their javascript that reads:

src="//platform.twitter.com/...."

what does the "//" represent? I've never seen that before?

Thanks experts!
0
rascal
Asked:
rascal
1 Solution
 
RaithZCommented:
Using a URL like //platform.twitter.com will point to either http://platform.twitter.com  or https://platform.twitter.com  depending on whether or not the URL originates from a http or https URL.  This helps reduce the need for protocol detection in website code and allows developers to include scripts and API calls easier because they don't need to detect whether the site is being delivered via http or https.
0
 
rascalAuthor Commented:
thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now