ASP.NET / iPad的Safari浏览器缓存问题? [英] ASP.NET / iPad Safari Cache Issue?

查看:292
本文介绍了ASP.NET / iPad的Safari浏览器缓存问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用ASP.NET AJAX的ASP.NET Web应用程序。我们从内部Safari浏览器在iPad上打开它。它工作正常。

我们把它保存到主屏幕作为一个单独的图标。我们添加了meta标签,使得它在全屏加载,无需Safari的导航栏。它工作正常。

后来,我们重新打开它,发现它坏了。下面是渲染,显示什么行不通的HTML的一部分。

 <一个ID =ctl00_Header1_btnHome级=按钮的href =JavaScript的:__ doPostBack('ctl00 $头1 $ btnHome','')的风格=显示:内联-block;字体大小:中等;高度:35px;宽度:130px;>主菜单< / A>


  1. 的内嵌样式不被应用。 (这些样式由ASP.NET *。皮肤文件自动插入的。)

  2. 点击链接不起作用。

重新打开的页面经常Safari浏览器,启用了开发工具,我发现一个JavaScript错误。


  

类型错误:前pression的结果Sys.WebForms[未定义]不是一个对象。


从我收集,无论是相关的ScriptResource.axd文件缓存,并重新加载没有,或者重装的时候,是不是重新调用一些初始化的事件。

请注意:清除Safari浏览器的缓存做这项工作。有时,在浏览器中刷新也有效。关闭&安培;重新加载主屏幕永远不会奏效上的图标。

你有pviously解决了这个问题$ P $?

编辑:
我相信这一切,因为我们正在与由web服务器视为无效参数在查询的ScriptResource.axd。它因此与一个错误页面响应。它避开了我,为什么新的Default.aspx将被刷新,但它指向的ScriptResource.axd无效参数。


解决方案

这是不是一个缓存/ COM pression错误。请参见原因ASP.NET AJAX是残疾人正确答案。

We have an ASP.NET web application which uses ASP.NET Ajax. We open it from within Safari on the iPad. It works fine.

We save it to the home screen as a separate icon. We added the meta tag that makes it load in full screen, without Safari's navigation bar. It works fine.

Later, we re-open it and notice it is broken. Here is a portion of the HTML that is rendered that shows what doesn't work.

<a id="ctl00_Header1_btnHome" class="Button" href="javascript:__doPostBack('ctl00$Header1$btnHome','')" style="display:inline-block;font-size:Medium;height:35px;width:130px;">Main Menu</a>

  1. The inline styles are not applied. (These styles are auto-inserted by an ASP.NET *.skin file.)
  2. Clicking on the link doesn't work.

Re-opening the page in regular Safari, with developer tools enabled, I find a JavaScript error.

TypeError: Result of expression 'Sys.WebForms' [undefined] is not an object.

From what I gather, either the related ScriptResource.axd file is cached and not reloaded or, when reloading, some initialization event is not re-invoked.

Note: Clearing Safari's cache does the job. Sometimes, a refresh in the browser also works. Close & reload the icon on the home screen never works.

Have you solved this issue previously?

Edit: I believe this is happening because we are querying for ScriptResource.axd with parameters that are considered invalid by the webserver. It is thus responding with an error page. It escapes me why the new default.aspx would be refreshed, but it would point to a ScriptResource.axd with invalid parameters.

解决方案

This is not a caching/compression bug. See Reasons why ASP.NET AJAX would be disabled for the correct answer.

这篇关于ASP.NET / iPad的Safari浏览器缓存问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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