代码之家  ›  专栏  ›  技术社区  ›  Phil Wright

Silverlight下载可以压缩以加快下载速度吗?

  •  2
  • Phil Wright  · 技术社区  · 17 年前

    Silverlight下载应用程序中的程序集时,是否可以将其作为压缩文件下载,然后在运行前解压缩?这将加快大型应用程序的下载时间。

    3 回复  |  直到 17 年前
        1
  •  5
  •   Tobias Hertkorn    17 年前

    afaik silverlight 2 xap文件已经压缩。因此,除非我误解了你,否则不应该通过压缩进行太多优化。(编辑:请参阅其他关于如何通过重新压缩进行优化的帖子和评论。谢谢!)

    Structure of the xap file

    您可以做的是在程序的一个小“引导”版本让用户分心足够长的时间后动态加载其他程序集 Dynamically Loading an Assembly

        2
  •  4
  •   Peter McG    17 年前

    Silverlight 2.xap文件格式已经压缩,例如,如果将其重命名为.zip,则可以在Windows资源管理器中打开它。

    不过,默认压缩并没有达到最佳效果,因此可以使用一些免费实用程序来显著减小.xap的文件大小。

    http://web-snippets.blogspot.com/2008/11/another-one-on-repacking-xaps-to-reduce.html

    http://blogs.msdn.com/delay/archive/2008/11/04/smaller-is-still-better-a-simple-step-continues-to-shrink-the-download-size-of-silverlight-2-applications.aspx

    http://blogs.telerik.com/ValeriHristov/Posts/08-05-13/Increasing_the_compression_ratio_of_the_XAP_files.aspx

        3
  •  1
  •   TomHastjarjanto    17 年前

    为什么不在服务器上启用GZIP压缩,这也适用于silverlight。