使用window.navigator-不匹配HTTP标头时显示不正确的用户代理
我使用Chrome Extention切换用户代理,这是http标头中的用户代理字符串:
这是window.navigator.useragent的控制台日志。他们为什么不一样?如何以JavaScript或Angular中的HTTP标头中的“用户”方式进行编程?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不使用“ Chrome的用户代理切换器”扩展,而是在Chrome Inspector中的“网络条件”选项卡中更改了“用户代理”。有效: https:/ doc/devtools/device-mode/Override-user-agent/
Instead of using the "user-agent switcher for chrome" extention, I changed the " user agent " in the network conditions tab in the chrome inspector. that worked: https://developer.chrome.com/docs/devtools/device-mode/override-user-agent/