Friday, October 23, 2015

Glyphicons showing up as Emoji in Safari

With the latest version of Safari 9 (iOS 9.1), I encountered a problem with Glyphicons (with bootstrap 3.3.5) showing up as Emoji.

It only happens intermittently when offline using an appcache.

Meanwhile, I also had Font Awesome Icons on the same page which were working fine.

I found a few Stack Overflow posts
How to prevent Unicode characters from rendering as emoji in HTML from JavaScript?
How to prevent Bootstrap's glyphicon rendering to emoji (Opera, FF)?

and a closed bootstrap bug
Bootstrap v3.1.1: Wrong glyphicons on iPad 

But none of them had any solution which worked, but then doing some further research, I then discovered that Bootstrap v4 is dropping Glyphicons

So, the solution I'm using is to get ready for Bootstrap v4 and just dump Glyphicons entirely

UPDATE: Turns out it was a PBKAC, I didn't have a .woff entry in the appache manifest, as glorious IE6 (Safari) doesn't support woff2 yet


Monday, October 19, 2015

Some notes about developing offline web apps with Chrome

I have been doing a fair bit of work developing offline support in web apps lately, I thought I'd share a few problems I've learnt along the way.

The above links are all (nearly all) bug reports, please star the issues if you care about them, please don't spam the bug reports with useless "I'd like to see this fixed" messages.

Hopefully this info might save you a bit of time

Safari - Web SQL - 14 unable to open database file [SOLVED]

Just a quick post, if you ever encounter "14 unable to open database file" in Safari, it's probably due to Safari apparently not properly Garbage Collecting db handles from openDatabase calls.

The solution is simply to re-use your database connections via a connection pool, as is common practice in many other application servers.

Apparently this got a bit better with Safari 8, Safari 7 was much worse.

I solved this myself after reading this issue https://github.com/pouchdb/pouchdb/issues/1068