Open jescalan opened 10 years ago
This example conditionally loads jQuery from a local file if you're developing on localhost.
A more in-depth explanation of this technique is definitely needed, though.
@jenius I understand what you were saying now - I merged your changes to use http:// instead, so I think we can close this issue without adding an explanation of //.
Unless you think mentioning both would be worth it?
Nah, less things to explain, less confusion. :+1:
You load jquery with a
//
protocol without explaining this. I've seen newer developers be confused by this before, a simple comment indicating that this allows loads from http or https could help a lot. Also if I'm not mistaken, using//
on localhost breaks the load, as it tries to load fromfile://
, so it might be best to just usehttp://
here, since it's pretty unlikely that beginning developers will be serving up their sites with https