w3c / Mobile-Checker

The Mobile Checker is a tool for Web developers who want to make their Web page or Web app work better on mobile devices.
https://validator.w3.org/mobile-alpha/
MIT License
322 stars 84 forks source link

Remove need to type http:// as start of web address. If no protocol selected assume http:// #105

Closed Howshall closed 9 years ago

Howshall commented 9 years ago

As per Google Page Speed/Mobile checkers https://developers.google.com/speed/pagespeed/insights/ allow a user to just type domain/URL without preceding protocol for greater ease of use. At the moment the input field will report 'You must enter a valid URL' which is technically accurate, but not very user friendly.

sideshowbarker commented 9 years ago

I think this change is a bad idea and should be reverted. There's a big difference between the use case of normal users typing addresses in a browser address bar, and web devs entering a URL into form field in a testing tool.

The current W3C HTML checker requires web devs using the tool to enter a valid URL including the scheme part. We have no intention of changing that, and this PR breaks consistency among our validators with regard to this.

Howshall commented 9 years ago

If there is dispute or worry about more usable auto assuming http:// prefix if protocol missed off front of submitted http://validator.w3.org/mobile-alpha/ URL field. Then alternate would be to make the error message clearer, so instead of current 'You must enter a valid URL' error message, how about 'You must enter a valid URL including protocol i.e. http://'

jean-gui commented 9 years ago

@sideshowbarker Of all the tools listed on https://www.w3.org/developers/tools, only validator.nu and mobile checker don't allow URLs without a scheme. So I would say that this PR actually reinforces consistency among our validators.