[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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