- 首先创建一个 webview 组建,使用后端简单实践一个能种上 cookie 的接口。
- 种上一个时长为一个月的 cookie (maxAge: 60 * 60 * 24 * 30)
- 稍等约一天后(通常不到一天)再次访问,此时cookie以及消失了
确认过部分案例,webview 的 user agent 有差别,但有些又是相同的。
相同的:
Mozilla/5.0 (Linux; Android 9; vivo 1725 Build/PKQ1.180819.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.62 XWEB/2889 MMWEBSDK/20210902 Mobile Safari/537.36 MMWEBID/8660 MicroMessenger/8.0.15.2001(0x28000F41) Process/appbrand0 WeChat/arm64 Weixin GPVersion/1 NetType/WIFI Language/zh_TW ABI/arm64 miniProgram
有变化的:
Mozilla/5.0 (Linux; Android 10; ELE-AL00 Build/HUAWEIELE-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/5697 MicroMessenger/8.0.16.2040(0x28001053) Process/appbrand1 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx47bb17ae9c1d7bd3
Mozilla/5.0 (Linux; Android 10; ELE-AL00 Build/HUAWEIELE-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/5697 MicroMessenger/8.0.16.2040(0x280010A3) Process/appbrand1 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx47bb17ae9c1d7bd3
(微信 build number 变了)