Last Updated: February 25, 2016
·
979
· evgenykolyakov

Be aware of the double slash

If you use double-slash ("//") for your CDN(s) and your website works just fine, but when you run it on a mobile device suddenly nothing works.

If your console (on your device or while you're in the device mode in your browser) shouts that the scripts and/or the styles weren't loaded, then you're browser probably doesn't support on of the following:

  1. <a href="http://www.ietf.org/rfc/rfc1808.txt" target="_blank">RFC 1808</a> Section 4

  2. <a href="http://www.ietf.org/rfc/rfc1808.txt" target="_blank">RFC 2396</a> Section 5.2

  3. <a href="http://www.ietf.org/rfc/rfc3986.txt" target="_blank">RFC 3986</a> Section 5.2

Therefore, always indicate the protocol in the links on your website. Also it causes less redirects if the CDN is HTTPS only and prevents from false links when the HTTP version doesn't even exist while your protocol is HTTP (which shall cause the CDN try to connect to an HTTP version instead of the only available HTTPS version)

;)