Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2013-02-04
2
160 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 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Border and image sizing 5 29
div to fit another div 8 28
IF statment In Powershell 12 17
Wordpress Hacked 1 28
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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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)

829 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