My same page, now want to distinguish between WAP or app template production, how to distinguish?
Reply content:
My same page, now want to distinguish between WAP or app template production, how to distinguish?
Differentiate by User-agent in the HTTP header
App's own words, you can customize a user-agent
Without changing the app code, the UA for IOS app is like this:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B137
:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B143 MicroMessenger/6.3.6 NetType/WIFI Language/zh_CN
Safari:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1
You can see the app default, not the same as safari, or you can make a zone
Android I have no device on hand, you can try to see for yourself