• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • 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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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