Does jQuery mobile (or docs) perform userAgent sniffing to decide whether to generate back button?
Not owning an Android or iPhone, I tried starting Chromium browser with the "Android" and "iPhone" user agent strings. I noticed that the jQuery mobile docs sprout a back button when I start the browser with the "iPhone" UA string, but not when I do it with the "Android" string.
S开发者_如何学JAVAince JQM turned off back buttons by default, does JQM itself perform UA sniffing or did they program that into the docs specifically?
After some more work and digging I found out the following:
Either my earlier observation (about presence or absence of back button depending on UA string) was incorrect, or I was looking at a different version of the docs (there are different versions for each release)
Writing my own app, my own back button was NOT turned off by default. But it turns out I was using an alpha release of JQM (1.0.4), instead of the more recent beta release
The beta release documentation appears to be tailored to tablet apps (has a two-column layout. Maybe it does screen size detection? I can't see that working on a phone)
In conclusion, thanks to the good folks at Stackoverflow for looking at this question. It doesn't seem to have been much of an issue at all
精彩评论