Note that there are some explanatory texts on larger screens.

plurals
  1. POhow can compress data
    text
    copied!<p>1. My host uses IIS 7 and IIS is not my right to access settings. Now how do the web.config or the other I sent a js/css/aspx to apply the Gzip.</p> <p>2.how can enable etags for iis6</p> <p>how can enable this for my web site this not work(Yslow)</p> <pre><code>&lt;httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"&gt; &lt;scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/&gt; &lt;dynamicTypes&gt; &lt;add mimeType="text/*" enabled="true"/&gt; &lt;add mimeType="message/*" enabled="true"/&gt; &lt;add mimeType="application/javascript" enabled="true"/&gt; &lt;add mimeType="*/*" enabled="false"/&gt; &lt;/dynamicTypes&gt; &lt;staticTypes&gt; &lt;add mimeType="text/*" enabled="true"/&gt; &lt;add mimeType="message/*" enabled="true"/&gt; &lt;add mimeType="application/javascript" enabled="true"/&gt; &lt;add mimeType="*/*" enabled="false"/&gt; &lt;/staticTypes&gt; &lt;/httpCompression&gt; &lt;urlCompression doStaticCompression="true" doDynamicCompression="true"/&gt; </code></pre> <p><strong>Edit</strong></p> <p>this code in gloabal.asax good work but still Yslow show does not use Gzip??</p> <p>void Application_PreRequestHandlerExecute(object sender, EventArgs e) { HttpApplication app = sender as HttpApplication; string acceptEncoding = app.Request.Headers["Accept-Encoding"]; Stream prevUncompressedStream = app.Response.Filter;</p> <pre><code> if (!(app.Context.CurrentHandler is Page || app.Context.CurrentHandler.GetType().Name == "SyncSessionlessHandler") || app.Request["HTTP_X_MICROSOFTAJAX"] != null) return; if (acceptEncoding.Contains("gzip") ) return; acceptEncoding = acceptEncoding.ToLower(); if (acceptEncoding.Contains("deflate") || acceptEncoding == "*") { // gzip app.Response.Filter = new GZipStream(prevUncompressedStream, CompressionMode.Compress); app.Response.AppendHeader("Content-Encoding", "gzip"); } else if (acceptEncoding == null || acceptEncoding.Length == 0) { // defalte app.Response.Filter = new DeflateStream(prevUncompressedStream, CompressionMode.Compress); app.Response.AppendHeader("Content-Encoding", "deflate"); } } </code></pre> <p><a href="http://www.stardeveloper.com/articles/display.html?article=2007110401&amp;page=1" rel="nofollow">Article Link</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload