Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing I don't quite understand is omitting protocol. If you don't know the protocol, fine it makes sense to omit it. However if you know a resource can always be loaded via HTTPS (eg from CDN), isn't it safer to force HTTPS?


I think you're right.

http://www.paulirish.com/2010/the-protocol-relative-url/

This page outlines the original argument, as well as the updated reasoning that you suggest: always use HTTPS if it is available, even if requesting from a page served over HTTP.


My best guess would be that any work done by a Googler will be served up from a domain included in the HSTS Preload List (forces SSL in most browsers)


I always omit the protocol because I develop on a local server using HTTP, but deploy to a remote server using HTTPS.


I agree, the protocol part seems pretty outdated.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: