QR code with URL, does it *REALLY* need the http://?
Asked Answered
A

4

19

It seems like most (if not all) QR readers on my iPhone handle URLs without the http:// just fine but I was wondering if that is universal? Android? BlackBerry? Is there an RFC somewhere that I should be reading

I'm building a QR management/url shortener system and was wondering if it was absolutely necessary. If not, I can drop 7 characters from my QR's URLs and make them the lowest level of complexity (16 characters or less). Which, from everything I've read, is a Good Thing™.

Angary answered 15/11, 2010 at 17:0 Comment(4)
Just tried Barcode Scanner on Android, and it works without the http://. Don't know about others though..Nuremberg
While most QR readers will launch a browser and assume http, leaving it out certainly bothers me. How is the phone supposed to know that you intend HTTP? It guesses.Nogas
I just tried a couple of more obscure scanners myself (MAAD Qr and i-nigma) and some just showed it as a string and didn't realize it was a URL. Might be an answer to my question right there.Angary
It is a pity that QR code generators enforce the http:// or www element at the beginning of a URL. On ios it is possible to have a URL be handled by a specific app by using the app's identifier instead of the http://. For example: phyphox://some/url would open (or forward) the URL to the app Phyphox.Bailable
A
16

I haven't found any absolute documentation that says it must have it. But... After testing a number of QR reader apps, it's clear that many of them will 'guess' at a url if there is no http:// in it. But many do not and display it as just a string. Since it's a URL, it really does need it. And if any apps won't read it, then I have to bow to them and add it for all of them.

Angary answered 22/11, 2010 at 16:10 Comment(2)
Just to mention: We had an issue concerning URLs without 'http://' with several iOS apps and on Blackberry. Adding 'http://' fixed the problems with all apps we were able to test with. Conclusion: Always add http:// to your linksDecalogue
On ios, one can make a web resource be opened by (forwarded to) a specific app by adding the app's internal name instead the https. For example: phyphox://some/url/to/xmlBailable
G
18

Hey Dan I am the dev of Barcode Scanner and just saw your question. I have a few more tidbits of info which may help.

There is no real 'standard' for this; I suppose the HTTP specification is the closest thing and technically it does say you need "http://". This wiki has everything we think we know about standards and de facto standards in this area.

I can tell you that QR codes have special modes to encode digits only, and alphanumeric-only text. The alpha mode includes only capital letters, but does include key punctuation like colon and slash. So, HTTP://EXAMPLE.ORG/BAR ought to be encodable in QR codes in fewer bytes than http://example.org/bar.

URLs themselves are case-sensitive however. It's not necessarily OK to uppercase a URL. But the server application may be case-insensitive. If you control the endpoints and know you can use all uppercase, this is a way to perhaps squeeze into version 1.

Finally I'll say that version 1 QR codes are a little weird since they have no alignment pattern. Without a fourth point to find, it can't (well, the dumb-but-effective process employed by Barcode Scanner and by extension a lot of scanners) account for perspective distortion. It happens to work with only small tilt. But version 2 actually has a small advantage for decodability with that alignment pattern.

Greenery answered 10/12, 2010 at 12:58 Comment(2)
Very good info, Sean. Thanks! Interesting tidbit about the ver 1 codes not having the extra reference point. Noticed that but never understood the impact.Angary
Note that sadly, some QR code readers will recognise a URL starting with upper-case HTTP:// or HTTPS:// but then fail to open it! So lower-case http:// or https:// seems to be a requirement (which takes a few more bits to encode and results in a slightly larger QR code).Mittel
A
16

I haven't found any absolute documentation that says it must have it. But... After testing a number of QR reader apps, it's clear that many of them will 'guess' at a url if there is no http:// in it. But many do not and display it as just a string. Since it's a URL, it really does need it. And if any apps won't read it, then I have to bow to them and add it for all of them.

Angary answered 22/11, 2010 at 16:10 Comment(2)
Just to mention: We had an issue concerning URLs without 'http://' with several iOS apps and on Blackberry. Adding 'http://' fixed the problems with all apps we were able to test with. Conclusion: Always add http:// to your linksDecalogue
On ios, one can make a web resource be opened by (forwarded to) a specific app by adding the app's internal name instead the https. For example: phyphox://some/url/to/xmlBailable
V
4

QR readers usually identify as a URL any text that conform to ANY of this conditions:

  • Text starts with http:// (or HTTP://)
  • Text starts with www.
  • Text starts with MEBKM: (NTT DoCoMo format for web bookmark)

You should be fine without http if your url starts with www. but it's not your case.

As Sean points out, you should use all-caps urls instead.

You can fit up to 24 alphanumeric characters in a Version 1 level L QR, wich is just enought for a url shortener. Example:

HTTP://1QR.ES/AAAAAAAAAA

HTTP://1QR.ES/AAAAAAAAAA

Vela answered 7/8, 2012 at 12:46 Comment(2)
Note that sadly, some QR code readers will recognise a URL starting with upper-case HTTP:// or HTTPS:// but then fail to open it! So lower-case http:// or https:// seems to be a requirement (which takes a few more bits to encode and results in a slightly larger QR code).Mittel
but relevant is mostly the mobile camera and the OS because thats what people use and this works fine with uppercase. I stick with uppercase to make it encode size-friendly.Geologize
P
4

Fun fact: Samsung Galaxy phones (e.g. S8 and S9) will open a QR code with a URL that has "HTTP" or "HTTPS" (in uppercase) in their text editor. Create the same URL with lowercase "http" or "https" and the same URL and it will open in a browser as expected.

Peshawar answered 25/3, 2021 at 22:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.