Solved

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

Posted on 2013-02-04
2
157 Views
Last Modified: 2013-02-04
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
Comment
Question by:rascal
2 Comments
 
LVL 6

Accepted Solution

by:
RaithZ earned 500 total points
ID: 38853344
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
 
LVL 1

Author Closing Comment

by:rascal
ID: 38853360
thank you!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now