6 ms·
In the past I've used the google charts API to generate QR codes. Is there a benefit to generating a qrcode on the client side?
by lwhi 16y ago
In the past I've used the google charts API to generate QR codes.
Is there a benefit to generating a qrcode on the client side?
- _pius 16y agoFrom the OP: It doesn't rely on external services which go on and off, or add latency while loading.
- lwhi 16y agoThat's true - but the charts API works without JS, and is inserted into the page as an image which could be seen as equally advantageous. Still - it's great that this plugin exists.
- zefhous 16y agoI can see it being used with wkhtmltopdf (uses webkit to generate PDFs) so invoice generation or something doesn't require an external request.
- lwhi 16y agoThat looks like a nice project, thx.
- robotron 16y agoI touched on this in another comment and zefhous is pretty much on the money. Where I'm at we have a web-based interface for our warehouse, inventory and CSR systems. QR codes are all over the place and with our web UI's we use Charts for QR generation. This causes a bottle-neck when things are moving really fast on the floor. I haven't looked at this yet but it sounds like something we need.
- alunny 16y agoThe Google charts API doesn't provide an SSL interface - if you use it on a page served over https, you'll get a mixed content warning. [EDIT] I was mistaken, see andrewjshults's reply.
- andrewjshults 16y agoThe google charts link at the top of the thread (http://news.ycombinator.com/item?id=2419367 http://news.ycombinator.com/item?id=2419367) https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=news.ybombinator.com https://chart.googleapis.com/chart?chs=150x150&cht=qr... is served via HTTPS. Their docs don't officially acknowledge supporting HTTPS but it looks like people have been doing it since 2007 (at least - http://groups.google.com/group/google-chart-api/browse_thread/thread/95c463d88cf3cfe4 http://groups.google.com/group/google-chart-api/browse_threa... )
- alunny 16y agoInteresting - looks like chart.googleapis.com works over HTTPS: https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=news.ybombinator.com https://chart.googleapis.com/chart?chs=150x150&cht=qr... but chart.apis.google.com (which Google formerly used) does not: https://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=news.ybombinator.com https://chart.apis.google.com/chart?chs=150x150&cht=qr&#... Turns out I was looking at some outdated docs. Thanks!
- yonran 16y agoI had installed one of the numerous QR Code extensions for Chrome (press the button and it generates a QR code of the URL to continue reading on the phone). Unfortunately, I always wanted to send the URL to my phone _after_ losing wifi contact, so the image would fail to load. I was so annoyed that I downloaded the ZXing source and learned GWT so I could compile the QREncoder to Javascript for myself. This looks like a neater and more lightweight solution.