ios - What is a good way for an app user-agent string looking like iPhone/Chrome/Whatever to most of the websites? -


we making ios , android app has webview part of functionality. , when views our own website, tuning pages in-app view (e.g. cut out header app has own chrome anyway). rest of web show and.. here problem comes.

we identify ourselves in user-agent string "ourapp/0.9.24 (iphone; ios 6.1.2; scale/2.00)")" similar iphone, not iphone , websites including www.google.com show desktop pages instead of mobile optimized ones.

has had similar issues? suggestions on how make user string identify our app yet iphone of web sites including www.google.com?

p.s. typical iphone browser string looks following: "mozilla/5.0 (iphone; cpu iphone os 5_0_1 mac os x) applewebkit/534.46 (khtml, gecko) mobile/9a405"

i think result you're seeing expected. sites sniff user-agent in order determine how display content. essentially, you're creating "unknown" agent far rest of world concerned, default typically show desktop version.

perhaps can use default user-agent string add onto end extension. check out https://en.wikipedia.org/wiki/user_agent_string#format , http://tools.ietf.org/html/rfc2616#section-14.43

note description of last segment

mobile/7b405: used browser indicate specific enhancements available directly in browser or through third parties. example of microsoft live meeting registers extension live meeting service knows if software installed, means can provide streamlined experience joining meetings.

bottom line, according spec should able add "/product comment" identify product in case of iphone string you append "/0.9.24 ourapp" end rather beginning , sniff that.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -