Esri / bootstrap-map-js

A light-weight JS/CSS extension for building awesome mapping apps with Bootstrap and ArcGIS.
http://esri.github.io/bootstrap-map-js/demo/index.html
Apache License 2.0
365 stars 392 forks source link

Using // shortcut instead of http:// is a bad practice #155

Closed vorg closed 8 years ago

vorg commented 8 years ago

It's bad practice as it prevents file from being loaded localy

The url from demo/index.html#L19:

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">

resolves to

file://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css

and prevents the map from loading properly.

jgravois commented 8 years ago

I'd say that loading your application in the browser via file protocol (as opposed to http://) is bad practice too, but i concede the point that resources that are available via https should just be loaded via https.

pull requests welcome.

vorg commented 8 years ago

Following the answers here http://stackoverflow.com/questions/9646407/two-forward-slashes-in-a-url-src-href-attribute No I know it's useful for automatic protocol selection http vs https. So it's definitely a good practice on the server and in production. Just a bit annoying to run the examples for the first time...