Today several users on my site reported they were seeing incorrect themes for their iPhones, iPads, and Android devices. After looking into it a bit, I saw that the mappings for the latest browscap (4824) were coming up incorrectly (the iPhone/iPad were mapping to Safari), so I notified Gary Keith, the maintainer of the browscap database.
He mentioned that he is revamping the structure of browscap to more accurately identify browsers. A good goal, but it might cause some major breakage here. He was unaware of Switchtheme, and I pointed him at sun's contact page, but thought I should also notify in the other direction as well.
For the short term, I've put hack fixes in my database for the iPhone and iPad - haven't dealt with Android yet (and there may be others). For anyone else wanting a short term solution, here are the mysql commands I used:
UPDATE browscap SET useragent='Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3% like Mac OS X; %) %AppleWebKit/% (KHTML, like Gecko) %Version/5.% Safari/%' WHERE useragent LIKE '%(iPhone; U; CPU iPhone OS 4_3%';
UPDATE browscap SET useragent='Mozilla/5.0 (iPad; U; CPU OS 4_3% like Mac OS X; %) %AppleWebKit/% (KHTML, like Gecko) %Version/5.% Safari/%' WHERE useragent='Mozilla/5.0 (iPad; U; CPU OS 4_3% like Mac OS X; %)%';
TRUNCATE TABLE cache_browscap;
Comments
Comment #1
kcoop commentedI should add, he can be contacted here:
http://browsers.garykeith.com/contact-me.asp
Comment #2
nicolasg commentedI was hit with this change just today. For some time I have been relying on browser=iPhone.
Such a drastic change to the database is not good.
His contact page is 404 now.