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

The protocol or scheme is the "http" or "https" keyword. The colon is a separator. The "//" introduces the "authority component" or host.

https://en.wikipedia.org/wiki/URL#Syntax

Whatever the user is "throwing at you" if it doesn't have these things in the front, it is not a "URL". It is not even a "protocol-relative URL".



You are technically correct, but for this use case it doesn’t matter, and everyone knows what is meant here. The parent also didn’t claim that a “url without the protocol” is itself a URL (nor, to be technically precise, a relative URI reference).




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

Search: