Hacker News new | past | comments | ask | show | jobs | submit login

Great little tool, but please don't force me to type https:// and just add it automatically when I type something like example.com



Another suggestion is to use input with type=“url”. This makes mobile keyboards not capitalize and auto correct (I think).


I thought that one was unable to handle domains without a protocol, which makes it pretty much useless for normal business cases. I’ve never met a single non-technical person that understood what that https was, why they should add it, or didn’t get immeasurably bored if you tried to explain it…


To be fair, even Tim Berners Lee doesn't understand what the :// is for and has apologised for adding it.


Which would be even more of a reason to standardise an input field that handles web addresses as humans enter them, not machines prefer them. Yet, here we are.


I think you’d just prefill with https:// and let the user type the rest.


Depending on how your forms are set up, this will cause the field to be marked as invalid as soon as the user interacts with any of the forms fields, if not on load. Also, this requires additional handling for copy paste etc.


> I thought that one was unable to handle domains without a protocol

Check if the protocol is included and add if necessary


No, that doesn’t work. Since the browser validates the field, it is marked as invalid unless there’s a protocol present. So you’re back to using the text field, but loose out on input optimisations for URLs.



Yep, I'll fix it. Fking annoying


Thank you :D




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

Search: