如何COM preSS JSON与ASP? [英] How to Compress JSON with ASP?

查看:112
本文介绍了如何COM preSS JSON与ASP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大的JSON数据串这是757KB。我试过GZIP'ing它,它成功地降低文件大小到143KB。但是,它的gzip压缩的状态,我的jQuery函数不能利用COM $ P $的pssed JSON数据。

I have a large JSON data string that's 757KB. I tried GZIP'ing it, which successfully reduced file size down to 143KB. But, in it's GZIP'ed state, my JQUERY function can't make use of the compressed JSON data.

任何建议如何在IIS / ASP环境融为一体preSS JSON,仍然能够在jQuery函数使用JSON数据?

Any suggestions on how to compress JSON in an IIS/ASP environment and still be able to use the JSON data in a JQUERY function?

推荐答案

希望这有助于:


  • 激活动态的COM pression

  • 开启SYSTEMDIR(C:\\ Windows \\ System32下),并找到该文件: inetsvr \\设置\\对ApplicationHost.config

  • 找到的< dynamicTypes方式> 标签结果
    要确保你有
        <添加mime类型=应用/ JSON启用=真/方式> 列表

  • 尝试减少数据传递量。 757KB是信息不少。结果
    如果你通过HTML,你就错了。传递数据,并使其客户端。结果
    如果您传递明文数据,你可能传递太多了;尝试在更多的请求分割它,才能让整个信息的用户展示的一部分,同时还加载它。

  • Activate Dynamic Compression
  • Open SystemDir (C:\Windows\System32) and find this file: inetsvr\config\applicationhost.config
  • Find the <dynamicTypes> tag.
    Be sure you have <add mimeType="application/json" enabled="true" /> in the list.
  • Try reducing the amount of data you pass. 757KB is a LOT of information.
    If you pass HTML, you are doing it wrong. Pass the data and render it client side.
    If you are passing plain data, you are probably passing too much of it; try splitting it in more requests, in order to let the user show part of the whole information while still loading it.

这篇关于如何COM preSS JSON与ASP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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