How to Compress JSON with ASP?

前端 未结 1 1599
慢半拍i
慢半拍i 2020-12-19 20:41

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 c

相关标签:
1条回答
  • 2020-12-19 21:37

    Hope this helps:

    • 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.
    0 讨论(0)
提交回复
热议问题