Questions tagged [protocol-relative]

Protocol-relative URLs are URLs beginning with //. An example is //example.com/file.js. They allow specifying all parts of the URL except the protocol, which is the same as the current page. This mechanism helps avoid mixed content warnings between HTTP and HTTPS.

29 questions
3
votes
1 answer

Protocol-relative 'image' URL in Schema.org

My image addresses look like this: //cdn.shopify.com/....jpg Google SDTT: Although there are no indicated errors, if I paste image address in a browser, I will get: Your file was not found Do I need to add https: in order to make it…
NeoN
  • 107
  • 1
  • 11
3
votes
0 answers

How do I lazy load Angular 2 components protocol relatively?

I am attempting to lazy load a component in angular 2, but I get a mixed content error. My application is running in https, but the component is being loaded over http. Is there a way to force a protocol relative load?
redcloud1800
  • 123
  • 1
  • 1
  • 5
3
votes
2 answers

Protocol Relative URL method not working in Chrome

Love searching on Stackoverflow for answers, but this is my first post. Hopefully others find this useful as well! I have a site that needs to be https because it hosts facebook apps. I have it set up (dedicated IP and SSL certificate) but when I…
Jeremiah Prummer
  • 182
  • 4
  • 18
2
votes
2 answers

Are there cases where Protocol-Relative URLs is preferred over HTTPS?

Protocal-relative URLs Protocol-relative URLs are URLs that begin with //, instead of http:// or https://. The actual protocol used to load the resource is derived from the containing page; Therefore, //example.com/smile.jpeg in an HTTPS page will…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
2
votes
2 answers

Why ever use relative protocols if I can use https?

Living in Syria, I feel really unhappy when a (Facebook, G+, Twitter... etc) plugin doesn't work on 90% of the web. The problem is that these (social) websites are not welcome in Syria (gov decisions), but still work perfectly using https. However,…
Tamer Shlash
  • 9,314
  • 5
  • 44
  • 82
1
vote
1 answer

What are the advantages of leaving out out the protocol for src=?

I see that the src URL for jQuery has no protocol specified: