http-compression

Implement http compression for post data

半城伤御伤魂 提交于 2019-12-11 10:51:25
问题 I understand there is little or no standard for implementing gzip compression for data transfers to a webserver (as opposed to the standardized option available for the response). But I'm curious what would be the direction to go if I did want to do my own implementation of this this at the server level. Is this something a custom module for IIS could handle? 来源: https://stackoverflow.com/questions/16822295/implement-http-compression-for-post-data

Gzip http compression problem on iis7

巧了我就是萌 提交于 2019-12-11 03:23:52
问题 My web hosting provider is running IIS7 and I am having loads of trouble to get gzip compression to work properly. Host admins say compression is installed. I can confirm compression using some online checking services but not with others. PageSpeed Firefox add-on also says the site is uncompressed. I am personally sitting behind a Squid proxy but web.config settings should take care of proxy issue. Below is the relevant web.config snippet. Most of it is borrowed from various sites. Any

gzip compression not working with IIS 8.5

爷,独闯天下 提交于 2019-12-11 01:07:22
问题 I have a Server 2012 R2 box running IIS. I've tried enabling compression for several sites running on that box, but I can't figure out why it won't work. My request headers all show accept-encoding, but the response headers are always Transfer-Encoding:chunked and Vary:Accept-Encoding. The following steps have been performed to try to get gzip compression working: Dynamic and Static compression have been enabled on each site and at the machine level Both compression methods are installed from

WCF custom binding for compression

若如初见. 提交于 2019-12-10 20:33:39
问题 Following the sample for compression by Microsoft. I have added the encoder, encoder factory, and binding element to my solution. The difference from their sample is that we do not register our endpoints via the config file (requirement), but instead use a custom Service Host Factory. Service Host: protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { ServiceHost host = base.CreateServiceHost(serviceType, baseAddresses); if (host.Description.Endpoints.Count

Compressing (Gzip or Deflate) Shows, Lists and views in Couchdb

帅比萌擦擦* 提交于 2019-12-10 14:49:13
问题 It seems that couchdb automatically compress all its _attachments when requested with the correct header. But unfortunately this doesn't happen for views, show or lists. Is there any way to achieve a compression before returning the result to the client? Is using a third party library like deflatejs (didn't test it yet) a bad approach? Thanks 回答1: You can certainly use js-deflate in show and list functions, but you cannot do it in view functions. I also suspect it would be inefficient (just a

Windows 8 apparently removes content-encoding header from compressed HTTP responses

情到浓时终转凉″ 提交于 2019-12-09 02:36:57
问题 I'm not completely sure whether this belongs on SO, but I don't know where else to ask. While I was checking the loading speed of a web app of mine I noticed that apparently no HTTP response (no matter what type - html, css, js) is gzip/deflate compressed. That is, no response header like "Content-Encoding: gzip" is present in any request and the browser reports that the resource is not compressed. tested and confirmed in multiple browsers (IE10, FF 17, Chrome 23, Opera 12.10, Safari 5.x)

HTTP-Compression in rails not working for JSON-responses

北战南征 提交于 2019-12-08 10:37:43
问题 I have rails 3.2.1 application and nginx. In nginx configurations I set gzip on; , and compressing works for pages, css, js files. But it does not work for JSON responses. As I found the solution for rails is to add: config.middleware.use Rack::Deflater into application.rb. And it helps: before response was 45Kb, now near 8Kb. But, now I found that compression works only in Mac Chrome, Mac Firefox and Windows Chrome. For IE 10, IE 11 and Windows Firefox - it does not work: I see Accept

IIS understand static files in MVC as dynamic content

只谈情不闲聊 提交于 2019-12-07 04:49:54
问题 Playing with the httpCompression I relalized that IIS understand static files in MVC as dynamic content, so even if you tick the " Enable static content compression ", but don't tick " Enable dynamic content compression ", IIS will return the .css and .js files without compression: GET /MVCX/Content/Site.css HTTP/1.1 Host: localhost Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 Accept: text/css,*/*

IIS understand static files in MVC as dynamic content

女生的网名这么多〃 提交于 2019-12-05 08:23:26
Playing with the httpCompression I relalized that IIS understand static files in MVC as dynamic content, so even if you tick the " Enable static content compression ", but don't tick " Enable dynamic content compression ", IIS will return the .css and .js files without compression: GET /MVCX/Content/Site.css HTTP/1.1 Host: localhost Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 Accept: text/css,*/*; Referer: http://localhost/mvcx/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-GB,en-US;q=0.8

“Content-encoding” header disappears from HttpHandler response if an exception occurs

别说谁变了你拦得住时间么 提交于 2019-12-05 07:42:12
I have a custom HttpHandler in which I manually enable output compression, like so: context.Response.AppendHeader("Content-encoding", "gzip"); context.Response.Filter = new GZipStream(context.Response.Filter, CompressionMode.Compress); This works nicely for most requests, but when an exception is encountered the "Content-encoding" header disappears from the response, while the compression filter remains in place. The result is that the error page is gzip compressed, but the browser receives no header indicating that fact. The browser then tries to display the still-compressed data as text,