访问我们的Web应用程序在普通的Andr​​oid 4.1和4.2的浏览器 [英] Accessing our web app on the stock Android 4.1 and 4.2 browser

查看:147
本文介绍了访问我们的Web应用程序在普通的Andr​​oid 4.1和4.2的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我目前有试图打开我们的Web应用程序的官方库存Android浏览器为果冻豆这个问题。我不知道我究竟能阐述这个问题,但我会尽我所能。

So I am currently having this problem of trying to open up our web app on the official stock Android browser for Jelly Bean. I don't know how well I can elaborate this problem, but I will try my best.

对于在任何浏览器(股票,火狐,Chrome),我们可以在URL中为我们的Web应用程序键入运行ICS或以上,设备,获得进入到登录页面,登录和查看一切都很好。

For devices that run ICS or older, on any browser (stock, firefox, chrome) we can type in the URL for our web app, get taken to the login page, login, and view everything fine.

对于运行果冻豆(4.1和4.2),如果我们在网址栏中输入进股票浏览器后,我们得到了以下设备:

For devices that run Jelly Bean (4.1 and 4.2), if we type in the url into the stock browser, we get the following:

但是,如果我们使用 Chrome浏览器火狐,它的罚款。

However, if we use Chrome or Firefox, its fine.

这是奇怪的是,我们得到这个错误,因为我已经在我们的网络上进行身份验证,我只尝试访问登录屏幕,以便其他身份验证将需要。

It's odd that we get this error because I am already authenticated on our network, and I only try to access the login screen so no other authentication would be required.

我们的Web应用程序从服务器抓取信息,并且它似乎并没有要在服务器端有问题。

Our web app grabs information from a server, and it doesn't seem to be a problem on the server side.

因此​​,它似乎是罪魁祸首就是股票浏览器果冻豆,我试图寻找了,如果有从ICS到果冻豆库存Web浏览器的任何变化,但我无法找到任何东西。

So it seems like the culprit is the stock browser in Jelly Bean, and I tried looking up if there were any changes to the stock web browser from ICS to Jelly Bean, but I couldn't find anything yet.

有没有人想出了这样一个问题,或者是意识到了的股票Android浏览器上做果冻豆?

Has anybody come up with an issue like this, or is aware of any big changes (maybe related to security?) that were made to the stock android browser on Jelly Bean?

编辑:此Web应用程序不可用外部。目前,我们仅内部测试,你都必须连接到我们的内部网络。

This web app is not available externally. Currently we have only tested internally where you would have to be connected to our internal network.

EDIT2:刚刚与海豚浏览器检查,同样的事情发生了......所以我现在真的失去了,因为我更不相信它有什么做的4.1+股票浏览器。此外,其他的东西,这让我感到更加失落的是,我只是检查了银河SIII的股票浏览器4.1.2和页面加载罚款......

Just checked with Dolphin Browser and the same thing happened... so I'm really lost now as I am even less sure that it has something to do with the 4.1+ stock browsers. Also, something else that makes me feel even more lost is that, I just checked on the galaxy SIII's stock browser on 4.1.2 and the page loads fine...

EDIT3:好消息,进一步的调查得到了广大开发者完成,显然这就是问题所在:

Good news, further investigation has been done by our devs and apparently this is the problem:

默认浏览器增加了额外的头,使我们的服务器认为它是一个Ajax请求,并拒绝它,因为请求的其余部分实际上不是一个Ajax请求的请求......此错误造成的,因为在默认浏览器Android 4.1以上版本增加了一个新的头所有请求X-请求 - 由于:com.android.browser。

the default browser adds an extra header to the request that makes our server think it is an ajax request and rejects it because the rest of the request is not actually an ajax request... This bug is caused because the default browser in Android 4.1+ has added a new header to all requests "X-Requested-With: com.android.browser".

所以我猜海豚浏览器HD这是否以及...进一步的调查正在这样做将回到这一点,并提出了一个答案

So I'm guessing the Dolphin HD browser does this as well... further investigation is being done so will get back to this and put up an answer

推荐答案

根据我们的开发者是谁做了一些研究:

According to our devs who did some research:

默认浏览器增加了额外的头,使我们的要求
  服务器认为它是一个Ajax请求,并拒绝它,因为其余
  请求实际上不是一个Ajax请求......

the default browser adds an extra header to the request that makes our server think it is an ajax request and rejects it because the rest of the request is not actually an ajax request...

此错误造成
  因为在Android 4.1以上版本的默认浏览器增加了一个新的头
  所有请求X-请求 - 由于:com.android.browser。

This bug is caused because the default browser in Android 4.1+ has added a new header to all requests "X-Requested-With: com.android.browser".

目前,我们不能花更多的时间寻找通过code良好的工作围绕这个问题......所以我们决定将这个文件作为一个已知的问题,并建议人们使用Chrome,如果他们有4.1+设备

At the moment we can't afford to spend more time trying to find good work around through code for this problem... so we decided to document this as a known issue and suggest people to use Chrome if they have a 4.1+ device

这篇关于访问我们的Web应用程序在普通的Andr​​oid 4.1和4.2的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆