1

我有一个带有各种 Telerik RadControls 的 aspx 网页,每次加载此页面时,Safari 移动似乎都会再次下载所有资源文件 - 例如,在每个页面请求时将以下文件下载到 ipad - 似乎什么都没有缓存,就像在其他非移动浏览器上一样。

http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/Common/Navigation/NavigationScripts.js
http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/PanelBar/RadPanelBarScripts.js
http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/Input/TextBox/RadInputScript.js
http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/ListBox/RadListBoxScripts.js
http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/ComboBox/RadComboBoxScripts.js
http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1109/Grid/RadGridScripts.js

即使 CDN 资源设置为缓存并具有 ETAGS,每次传递的 JavaScript 也超过 100K。

每次笔记本电脑浏览器缓存上面的资源文件而 ipad 没有缓存时,我已经为 ipad 和运行 IE/FF/Safari 的笔记本电脑安装了提琴手。

我认为这就是为什么我的应用程序在 Ipad 上的执行速度明显较慢的原因,尽管它可能也是 Ipad 上的缓慢 javascipt 解析......

有没有其他人有这个问题?我在这里遗漏了一些明显的东西吗?

谢谢。

编辑

我通过使笔记本电脑成为 iPad 的 http 代理来监控笔记本电脑上的 iPad 流量。

提琴手的额外信息:

Fiddler v2.3.0.0,笔记本电脑结果来自 IE8,iPad 版本。3.2.2.

从我的笔记本电脑,如果我去http://demos.telerik.com/aspnet-ajax/listbox/examples/default/defaultcs.aspx

并在提琴手中单击“First Look”几次后:

#   Result  Protocol    Host        URL                         Body    Caching     Content-Type    Process Comments    Custom  
1   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,608  private     text/html; charset=utf-8    iexplore:6172           
2   200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8  iexplore:6172           
4   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,608  private     text/html; charset=utf-8    iexplore:6172           
5   200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8  iexplore:6172           
7   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,608  private     text/html; charset=utf-8    iexplore:6172           
8   200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8  iexplore:6172           
10  200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,608  private     text/html; charset=utf-8    iexplore:6172           
11  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8  iexplore:6172           

如果我在 iPad 上执行相同操作,fiddler 会记录以下内容:

#   Result  Protocol    Host    URL                             Body    Caching     Content-Type    Process Comments    Custom  
1   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,380  private     text/html; charset=utf-8                
2   200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/Common/Navigation/NavigationScripts.js   7,856   public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
3   200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ComboBox/RadComboBoxScripts.js   16,238  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
4   200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/Ajax/Ajax.js 7,509   public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
5   200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ToolBar/RadToolBarScripts.js 13,372  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
6   200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
8   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,380  private     text/html; charset=utf-8                
9   200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/Common/Navigation/NavigationScripts.js   7,856   public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
10  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ComboBox/RadComboBoxScripts.js   16,238  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
11  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ListBox/RadListBoxScripts.js 13,199  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
12  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
13  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ToolBar/RadToolBarScripts.js 13,372  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
15  200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    54,380  private     text/html; charset=utf-8                
16  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/Common/Navigation/NavigationScripts.js   7,856   public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
17  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ComboBox/RadComboBoxScripts.js   16,238  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
18  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ToolBar/RadToolBarScripts.js 13,372  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
19  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/ListBox/RadListBoxScripts.js 13,199  public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
20  200 HTTP    aspnet-scripts.telerikstatic.com    /ajaxz/2010.3.1317/Ajax/Ajax.js 7,509   public, max-age=31536000  Expires: Sun, 17 Jan 2021 15:05:25 GMT    application/x-javascript                
21  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8      

编辑2:

我今天再次尝试了与上述完全相同的测试,并注意到:

1) iPad现在正在缓存 javascript

2) Telerik 演示没有使用 CDN,但它们是昨天的!(见下面的结果与上面的结果相比)

#   Result  Protocol    Host        URL                         Body    Caching Content-Type    Process Comments    Custom  
1   200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    53,036  private     text/html; charset=utf-8                
2   200 HTTP    demos.telerik.com   /aspnet-ajax/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2010.3.1317.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a1c2121e%3ae8945d51%3af4636213%3ac531f12c%3a4d471440%3af7131199%3ac17ca3a3  10,599  public, max-age=31533429  Expires: Sat, 18 Feb 2012 10:06:39 GMT    text/css                
3   200 HTTP    demos.telerik.com   /aspnet-ajax/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8f393b2b-3315-402f-b504-cd6d2db001f6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d%3a628ebdd0%3a9cdfc6e7%3aed16cbdc%3a2bef5fcc%3aa7e79140   160,387 public, max-age=31533429  Expires: Sat, 18 Feb 2012 10:06:40 GMT    application/x-javascript                
4   200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
10  200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    53,032  private     text/html; charset=utf-8                
11  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
14  200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    53,032  private     text/html; charset=utf-8                
15  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
18  200 HTTP    demos.telerik.com   /aspnet-ajax/listbox/examples/default/defaultcs.aspx    53,032  private     text/html; charset=utf-8                
19  200 HTTP    demos.telerik.com   /aspnet-ajax/Common/CodeViewer.js.aspx  5,534   private     text/javascript; charset=utf-8              
4

1 回答 1

2

我刚刚用 Fiddler 对其进行了测试 - 在 iPad(iOS 4.2)上的版本为 2010.3.1109 的页面上打开了一个 RadListBox,在我看来,CDN 资源已正确缓存,并且不会像您一样每次都从 CDN 刷新经历。

您能否分享有关此问题的更多详细信息,例如示例页面或我们可以对其进行测试的实时 URL?如果您喜欢隐私,您可以在 Telerik 帐户中打开支持票以发送这些支持票。

编辑:

我还用 3.2.2 进行了测试,但仍然无法重现此问题。您是否使用了一些值得一提的特定 iPad 设置或网络设置?

于 2011-02-17T14:05:38.337 回答