3

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.

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?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
s15199d
  • 7,261
  • 11
  • 43
  • 70

1 Answers1

3

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.
Alex Bagnolini
  • 21,990
  • 3
  • 41
  • 41
  • I'm running IIS6.0 that folder/file do not exist in my installation. Do you know where to flip that switch in IIS6.0? The data is as spartan as I can make it. It consists of: id, text, image Here's an example: {"id":"10071750","text":"Video Capture System for TICs, w/ Flash Memory Card, Card Reader, Li-ion Battery, and Storage Case by Cairns |10071750| $5199.99","image":"image_name.gif"} There's 5000+ iterations of these – s15199d Mar 25 '10 at 14:21
  • I found this http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5bce429d-c4a7-4f9e-a619-5972497b932a.mspx?mfr=true – s15199d Mar 25 '10 at 14:28
  • I added: htm, html, css, js, txt, log to static compression I added: asp, dll, exe to dynamic compression I then restarted the webserver, thinking IIS may need to be restarted for the changes to take effect. According to Firebug there is 0 reduction in filesize. – s15199d Mar 25 '10 at 14:57