http-compression

HTTP Compression: Some external scripts/CSS not decompressing properly some of the time

南楼画角 提交于 2019-11-27 15:52:12
I am implementing page/resource compression to improve website performance. I have tried to implement both blowery and wicked HttpCompress but end up getting the same result. This only seems to affect Firefox, I have tested on Chrome and IE. What happens is the first time I request the page all the external resources decompress ok. The 2nd or 3rd time the page has errors because the resource doesn't seem to be decompressed. I get unicode characters like: ������í½`I%&/mÊ{JõJ×àt¡`$Ø@ìÁÍæìiG#)«*ÊeVe]f (actually they can't be displayed properly here) Inspecting the page via firebug displays the

Azure Web App Not Using GZip Compression

六月ゝ 毕业季﹏ 提交于 2019-11-27 15:23:30
I was using WebPageTest to test the performance of my Azure Web App (ASP.Net vNext Web API/Angular). I got an F for both "Compress Transfer" and "Cache Static Content". After searching StackOverflow and Google, I added the following to my web.config: <urlCompression doStaticCompression="true" doDynamicCompression="true" /> <httpCompression> <dynamicTypes> <clear /> <remove mimeType="*/*" /> <add enabled="true" mimeType="text/*"/> <add enabled="true" mimeType="message/*"/> <add enabled="true" mimeType="application/x-javascript"/> <add enabled="true" mimeType="application/javascript"/> <add

Can I compress HTTP Requests using GZIP?

天涯浪子 提交于 2019-11-27 14:54:58
问题 I am communicating to a Tomcat Server using a Java ME application on my mobile device. I was wondering if I could compress my requests/responses using Gzip to reduce the number of bytes sent over the network. 回答1: Modern phones have so much CPU power and the network is relatively slow so compression makes perfect sense. It's quite easy to do also. On the J2ME side, you do something like this (assuming you use HttpConnection), hc.setRequestProperty("Accept-Encoding", "gzip, deflate"); if (hc

GZip compression with WCF hosted on IIS7

你离开我真会死。 提交于 2019-11-27 10:34:46
问题 Everyone, as far as I'm concerned the question is ansered in EDIT 2. Although it's only a partial solution to the IIS side of the problem, it's what I was looking for. So I'm going to add my query to the small ocean of questions on the subject. I'm trying to enable GZip compression on large soap responses from a WCF service. So far, I've followed instructions here and in a variety of other places to enable dynamic compression on IIS. Here's my dynamicTypes section from the applicationHost

Removing extra whitespace from generated HTML in MVC

寵の児 提交于 2019-11-27 09:51:49
问题 I have an MVC application view that is generating quite a large HTML table of values (>20MB). I am compressing the view in the controller using a compression filter internal class CompressFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { HttpRequestBase request = filterContext.HttpContext.Request; string acceptEncoding = request.Headers["Accept-Encoding"]; if (string.IsNullOrEmpty(acceptEncoding)) return; acceptEncoding =

Compress/Decompress NSString in objective-c (iphone) using GZIP or deflate

泪湿孤枕 提交于 2019-11-27 09:17:30
I have a web-service running on Windows Azure which returns JSON that I consume in my iPhone app. Unfortunately, Windows Azure doesn't seem to support the compression of dynamic responses yet (long story) so I decided to get around it by returning an uncompressed JSON package, which contains a compressed (using GZIP) string. e.g {"Error":null,"IsCompressed":true,"Success":true,"Value":"vWsAAB+LCAAAAAAAB..etc.."} ... where value is the compressed string of a complex object represented in JSON. This was really easy to implement on the server, but for the life of me I can't figure out how to

HttpWebRequest & Native GZip Compression

人走茶凉 提交于 2019-11-27 03:11:48
When requesting a page with Gzip compression I am getting a lot of the following errors: System.IO.InvalidDataException: The CRC in GZip footer does not match the CRC calculated from the decompressed data I am using native GZipStream to decompress and am looking at addressing this. With that in mind is there a work around for addressing this or another GZip library (free?) which will handle this issue properly? I am verifying the webResponse ContentEncoding is GZIP Update 5/11 A simplified snippit //Caller public void SOSampleGet(string url) { // Initialize the WebRequest. webRequest =

How do I enable GZIP compression for POST (upload) requests to a SOAP WebService on IIS 7?

走远了吗. 提交于 2019-11-27 02:19:31
问题 How can I enable compression for POSTed data uploaded to a .NET WebService (SOAP, not WCF)? I thought it would be a simple matter of enabling dynamic compression in IIS but after enabling, it's only compressing the response , not the POST request . I've added it as a Service Reference and I can't find any settings on the generated SOAPClient to enable compression of requests. It seems I might be missing a configuration setting or code on the client side to compress the request before sending

Compress HTTP GET Response

…衆ロ難τιáo~ 提交于 2019-11-27 01:12:01
I am currently working on migrating few of my MVC3 Controllers to MVC4 Api Controllers. I have implemented Compression mechanism for MVC3 controller Get Method Responses by inherting ActionFilterAttribute and overriding OnActionExecutiong method. After some Research I found that I need to use ActionFilterMethod from System.Web.HttpFilters . It would be great if somebody can share piece of sample code to get me started for this compressing HTTP response using GZip The easiest is to enable compression directly at IIS level. If you want to do it at the application level you could write a custom

HttpWebRequest & Native GZip Compression

北慕城南 提交于 2019-11-26 22:14:49
问题 When requesting a page with Gzip compression I am getting a lot of the following errors: System.IO.InvalidDataException: The CRC in GZip footer does not match the CRC calculated from the decompressed data I am using native GZipStream to decompress and am looking at addressing this. With that in mind is there a work around for addressing this or another GZip library (free?) which will handle this issue properly? I am verifying the webResponse ContentEncoding is GZIP Update 5/11 A simplified