简体   繁体   English

Firefox 中的用户代理 iOS iPhone

[英]User agent iOS iPhone in Firefox

When you display user agent ( Request.UserAgent ) in Firefox on iPhone, it is:当您在 iPhone 上的 Firefox 中显示用户代理( Request.UserAgent )时,它是:

Mozilla/5.0 (iPhone; CPU OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/23.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0(iPhone; CPU OS 13_3_1,如 Mac OS X) AppleWebKit/605.1.15(KHTML,如 Gecko)FxiOS/23.0 Mobile/15E148 Safari/605.1.15

It produced an error on page它在页面上产生了错误

This page contains the following errors: error on line 306 at column 16: xmlParseEntityRef: no name Below is a rendering of the page up to the first error.此页面包含以下错误:第 306 行第 16 列的错误:xmlParseEntityRef:无名称 以下是直到第一个错误为止的页面呈现。

In console:在控制台中:

Uncaught DOMException: Failed to set the 'innerHTML' property on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document.未捕获的 DOMException:无法在“元素”上设置“innerHTML”属性:提供的标记是无效的 XML,因此无法插入到 XML 文档中。

The word ' iPhone ' is missing between ' CPU OS ' compare to Chrome or Edge.与 Chrome 或 Edge 相比,“ CPU OS ”之间缺少“ iPhone ”这个词。 If you change it to (by adding 'iPhone' between 'CPU OS' which will become ' CPU iPhone OS '):如果您将其更改为(通过在将成为“ CPU iPhone OS ”的“CPU OS”之间添加“iPhone”):

Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/23.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0(iPhone; CPU iPhone OS 13_3_1,如 Mac OS X) AppleWebKit/605.1.15(KHTML,如 Gecko)FxiOS/23.0 Mobile/15E148 Safari/605.1.15

No error没有错误

Request.UserAgent in Chrome returns: Chrome 中的 Request.UserAgent 返回:

Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/23.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0(iPhone; CPU iPhone OS 13_3_1,如 Mac OS X) AppleWebKit/605.1.15(KHTML,如 Gecko)CriOS/23.0 Mobile/15E148 Safari/605.1.15

or Request.UserAgent in Edge returns:或 Edge 中的 Request.UserAgent 返回:

Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/23.0 Mobile/15E148 Safari/605.1.15 Mozilla/5.0(iPhone; CPU iPhone OS 13_3_1,如 Mac OS X) AppleWebKit/605.1.15(KHTML,如 Gecko) EdgiOS/23.0 Mobile/15E148 Safari/605.1.15

Steps to reproduce: Use user agent 'Mozilla/5.0 (iPhone; CPU OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/23.0 Mobile/15E148 Safari/605.1.15' in Chrome.重现步骤:在 Chrome 中使用用户代理“Mozilla/5.0(iPhone;CPU OS 13_3_1,如 Mac OS X)AppleWebKit/605.1.15(KHTML,如 Gecko)FxiOS/23.0 Mobile/15E148 Safari/605.1.15”。

Any advice how to fix it?任何建议如何解决它?

I know this doesn't answer your question, but I'm glad I stumbled upon your post because I noticed that one of the websites I use was only broken on Firefox for iOS (even Firefox Focus for iOS works, as well as Firefox for iPad).我知道这不能回答您的问题,但我很高兴我偶然发现了您的帖子,因为我注意到我使用的网站之一仅在 Firefox for iOS 上被破坏(即使 Firefox Focus for iOS 也能正常工作,Firefox for iOS 也能正常工作) iPad)。 This has got to be the reason why because that's the exact error I'm seeing.这一定是原因,因为这是我看到的确切错误。

For what it's worth, I've posted on the Firefox Support Forum: https://support.mozilla.org/en-US/questions/1282961对于它的价值,我已在 Firefox 支持论坛上发布: https : //support.mozilla.org/en-US/questions/1282961

As well as created a ticket on Web Compat: https://webcompat.com/issues/50808以及在 Web Compat 上创建票证: https ://webcompat.com/issues/50808

In case those get any feedback, I wanted to make sure you were at least aware.如果他们得到任何反馈,我想确保你至少知道。

EDIT: I was instructed by a moderator on the Firefox Support Forum to submit a bug report.编辑:Firefox 支持论坛上的版主指示我提交错误报告。 You can find this here: https://bugzilla.mozilla.org/show_bug.cgi?id=1625581你可以在这里找到这个: https : //bugzilla.mozilla.org/show_bug.cgi?id=1625581

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM