Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 906101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:19:46+00:00 2026-05-15T16:19:46+00:00

I am implementing page/resource compression to improve website performance. I have tried to implement

  • 0

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 response header as:

Cache-Control private

Content-Type text/html; charset=utf-8

Content-Encoding gzip

Server Microsoft-IIS/7.5

X-AspNetMvc-Version 2.0

X-AspNet-Version 2.0.50727

X-Compressed-By HttpCompress

X-Powered-By ASP.NET Date Fri, 09 Jul

2010 06:51:40 GMT Content-Length 2622

This clearly states that the resource is compressed by gzip. So something seems to be going wrong on the deflate side on the client?

I have added the following sections (in the appropriate locations) in the web.config:

<sectionGroup name="blowery.web">
  <section name="httpCompress" type="blowery.Web.HttpCompress.SectionHandler, blowery.Web.HttpCompress"/>
</sectionGroup>

<blowery.web>
    <httpCompress preferredAlgorithm="gzip" compressionLevel="high">
      <excludedMimeTypes>
        <add type="image/jpeg"/>
        <add type="image/png"/>
        <add type="image/gif"/>
      </excludedMimeTypes>
      <excludedPaths>
        <add path="NoCompress.aspx"/>
      </excludedPaths>
    </httpCompress>
</blowery.web>

<add name="CompressionModule" type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/>

Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:19:47+00:00Added an answer on May 15, 2026 at 4:19 pm

    This is an issue that I have face before and the problem is that the Content-Length is not correct. Why is not correct ? because its probably calculate before the compression.

    If you set Content-Lenght by hand, just remove it and let the module set it if he can.

    I note that you use the Blowery compression. Probably this is a bug/issue inside Blowery. If you can not locate it and fix it, why not use the Ms compression ?

    @ptutt if you are on shared iis, then maybe there have all ready set compression, so there is one compression over the other, and you only need to remove yours. If this is the issue then for sure the content-lenght is false because after the first compression, the second is break it.

    Check it out using this site https://www.giftofspeed.com/gzip-test/ if your pages is all ready compressed by default by iis.

    If not compressed by default then you can do it very easy. On Global.asax

    protected void Application_BeginRequest(Object sender, EventArgs e)
    {
        string cTheFile = HttpContext.Current.Request.Path;
        string sExtentionOfThisFile = System.IO.Path.GetExtension(cTheFile);
        
        if (sExtentionOfThisFile.Equals(".aspx", StringComparison.InvariantCultureIgnoreCase))
        {
            string acceptEncoding = MyCurrentContent.Request.Headers["Accept-Encoding"].ToLower();;
            
            if (acceptEncoding.Contains("deflate") || acceptEncoding == "*")
            {
                // defalte
                HttpContext.Current.Response.Filter = new DeflateStream(prevUncompressedStream,
                    CompressionMode.Compress);
                HttpContext.Current.Response.AppendHeader("Content-Encoding", "deflate");
            } else if (acceptEncoding.Contains("gzip"))
            {
                // gzip
                HttpContext.Current.Response.Filter = new GZipStream(prevUncompressedStream,
                    CompressionMode.Compress);
                HttpContext.Current.Response.AppendHeader("Content-Encoding", "gzip");
            }       
        }
    }
    

    Please note, I just write this code and have not tested. My code is a little more complicate, so I just create a simple verion of it.

    Find more examples:
    http://www.google.com/search?q=Response.Filter+GZipStream

    Reference:
    ASP.NET site sometimes freezing up and/or showing odd text at top of the page while loading, on load balanced servers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 523k
  • Answers 523k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It seems like you have 2 competing concerns: 1) which… May 16, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer Nothing magical is happening - you are indeed just generating… May 16, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer If anyone interested, my solution is on jsbin: http://jsbin.com/ixuye4/edit May 16, 2026 at 9:42 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm implementing jquery UI draggable and have 2 of these draggables that you see
I have a page which shows a Google map. I'd like to use Javascript
I have a parent object called Page that has a List of objects called
Hy, I am implementing a asp.net web application, and I have two webform files,
EDIT I just realized that I must have had a massive brain fart while
I'm implementing home brew ACL system in web app and it gives me hard
I'm currently implementing a RESTful API (nothing serious, just for a blog engine i'm
There were questions about multilingual apps in MVC here on SO but they were
i have setup a preDispatch plugin for my ACL. i have used the controller
I am (very) new to WPF and I have got a question regarding that.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.