是否有任何诊断工具可用于解决Opera Mini的内容交付问题?

时间:2021-12-05 17:06:10

I have an application that I'm targeting a wide variety of devices and platforms. The application can render different HTML based upon the type of client. However due to the complexity of the application, it shares a considerable amount of JavaScript libraries that rely on a number of async and ajax method calls.

我有一个应用程序,我瞄准各种各样的设备和平台。应用程序可以根据客户端的类型呈现不同的HTML。但是由于应用程序的复杂性,它共享了大量依赖于大量异步和ajax方法调用的JavaScript库。

One of the targets for the application is Opera Mini. This "sort-of" works but it seems like sometimes when building up the specialized markup to send down to the Opera Mini JVM client it does not wait until the async calls are complete. Are there any techniques or tools to see what's going on with the Opera Server (not my application web server) Side processing of the page to determine what I can do to make this solid?

该应用程序的目标之一是Opera Mini。这种“排序”有效但似乎有时在构建专用标记以发送到Opera Mini JVM客户端时,它不会等到异步调用完成。是否有任何技术或工具可以查看Opera Server(而不是我的应用程序Web服务器)发生了什么?对页面进行侧面处理以确定我可以做些什么来使其成为可靠的?

3 个解决方案

#1


It would appear that after further investigation that the server side browser is fairly picky when it comes to CSS. I can't remember the exact problem, but as soon as I removed the stylesheet all content was displayed properly. At that point I slowly re-introduced the CSS and everythning came back online and worked as expected.

看来经过进一步调查后,服务器端浏览器在CSS方面相当挑剔。我不记得确切的问题,但是一旦删除样式表,所有内容都正确显示。那时我慢慢地重新介绍了CSS,并且每个人都回到网上并按预期工作。

#2


Your javascript will only be allowed a short time before it is aborted:

您的javascript只会在中止前很短的时间内被允许:

JavaScript running on the Mini server will only run for a couple of seconds before pausing, for resource constraint reasons. This applies to JavaScript run due to an event firing e.g. onload, as well as code run because of a user action.

出于资源限制的原因,在暂停之前,在Mini服务器上运行的JavaScript只会运行几秒钟。这适用于因事件触发而运行的JavaScript,例如onload,以及因用户操作而运行的代码。

~ http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#javascript

So the best would be to serve the least javascripty version of your site to the Opera Mini user-agent.

因此,最好的方法是将最少的javascripty版本的站点提供给Opera Mini用户代理。

#3


You can type server:source in the address bar once a page is loaded if you want to see the current DOM tree.

如果要查看当前的DOM树,可以在加载页面后在地址栏中键入server:source。

It's also possible to post that source to a script on your server using server:source?post=http://your.server.com/script. It will send three fields as a POST request: url, host and html. You can then make your script save it to a file.

也可以使用server:source?post = http://your.server.com/script将该源发布到服务器上的脚本中。它将发送三个字段作为POST请求:url,host和html。然后,您可以将脚本保存到文件中。

(Answering an old question in case it helps someone.)

(回答一个老问题,以防有人帮忙。)

#1


It would appear that after further investigation that the server side browser is fairly picky when it comes to CSS. I can't remember the exact problem, but as soon as I removed the stylesheet all content was displayed properly. At that point I slowly re-introduced the CSS and everythning came back online and worked as expected.

看来经过进一步调查后,服务器端浏览器在CSS方面相当挑剔。我不记得确切的问题,但是一旦删除样式表,所有内容都正确显示。那时我慢慢地重新介绍了CSS,并且每个人都回到网上并按预期工作。

#2


Your javascript will only be allowed a short time before it is aborted:

您的javascript只会在中止前很短的时间内被允许:

JavaScript running on the Mini server will only run for a couple of seconds before pausing, for resource constraint reasons. This applies to JavaScript run due to an event firing e.g. onload, as well as code run because of a user action.

出于资源限制的原因,在暂停之前,在Mini服务器上运行的JavaScript只会运行几秒钟。这适用于因事件触发而运行的JavaScript,例如onload,以及因用户操作而运行的代码。

~ http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#javascript

So the best would be to serve the least javascripty version of your site to the Opera Mini user-agent.

因此,最好的方法是将最少的javascripty版本的站点提供给Opera Mini用户代理。

#3


You can type server:source in the address bar once a page is loaded if you want to see the current DOM tree.

如果要查看当前的DOM树,可以在加载页面后在地址栏中键入server:source。

It's also possible to post that source to a script on your server using server:source?post=http://your.server.com/script. It will send three fields as a POST request: url, host and html. You can then make your script save it to a file.

也可以使用server:source?post = http://your.server.com/script将该源发布到服务器上的脚本中。它将发送三个字段作为POST请求:url,host和html。然后,您可以将脚本保存到文件中。

(Answering an old question in case it helps someone.)

(回答一个老问题,以防有人帮忙。)