r/javascript • • Sep 02 '15

HTML5 Deck of Cards. 100% vanilla JS.

http://pakastin.github.io/deck-of-cards/
368 Upvotes

185 comments sorted by

View all comments

Show parent comments

2

u/parpaythrums Sep 02 '15

Better yet, use https:// instead!

1

u/angellus Sep 02 '15

No argument there, https should be used everywhere.

This can lead to issues also. I have only seen it lead to issues if you use iFrames that have HTTPS when the parent page is not and you are trying to communicate between the two through the use of sockets.

Your best bet is to use // everywhere and than use nginx or some other Web server to force all requests to HTTPS, but this is just getting into the heavy technical side that OP probably does not care about. // gives you the least possible chance of issues because of mixed content which is why I perfer it.

4

u/MrBester Sep 02 '15

Chrome sends Upgrade-Insecure-Requests: 1 in the headers now.

Using protocol agnostic URLs is now considered an anti-pattern (plus, Content-Security-Policy will snarl at you)

2

u/pkstn Sep 02 '15 edited Sep 03 '15

I don't want to break things up when used from file:// – if you want to try and tinker locally.. I think I'll keep those https://