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

  • SEARCH
  • Home
  • 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 1073623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:00:56+00:00 2026-05-16T21:00:56+00:00

Well, I got gzip working, but there are issues with IE. (works fine with

  • 0

Well, I got gzip working, but there are issues with IE. (works fine with FF and Chrome)
Message: ASP.NET Ajax client-side framework failed to load. (and many other js related errors)

How can I prevent gzip compression on ie browsers ??
Other people who had similar issues enabled compression in IIS and that seems to solve the issue, but I can’t do this on my discount machine…

This is what I use:

        HttpApplication app = (HttpApplication)sender;

        string acceptEncoding = app.Request.Headers["Accept-Encoding"];
        Stream prevUncompressedStream = app.Response.Filter;
        if (acceptEncoding != null && acceptEncoding.Length != 0)
        {

            acceptEncoding = acceptEncoding.ToLower();
            if (acceptEncoding.Contains("gzip"))
            {

                app.Response.Filter = new GZipStream(prevUncompressedStream, CompressionMode.Compress);
                app.Response.AppendHeader("Content-Encoding", "gzip");
            }

            else if (acceptEncoding.Contains("deflate"))
            {
                // defalte

                app.Response.Filter = new DeflateStream(prevUncompressedStream, CompressionMode.Compress);
                app.Response.AppendHeader("Content-Encoding", "deflate");

            }
        }
  • 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-16T21:00:56+00:00Added an answer on May 16, 2026 at 9:00 pm

    Try to compress GZip only the files that ends on aspx and left WebResource that contains the Javascript that you have problem, to compress by iis him self.

    string cTheFile = HttpContext.Current.Request.Path;
    string sExtentionOfThisFile = System.IO.Path.GetExtension(cTheFile);
    
    if (sExtentionOfThisFile.Equals(".aspx", StringComparison.InvariantCultureIgnoreCase))
    {
        // run your code for compression here
    }
    

    This will solve your problem.

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

Sidebar

Related Questions

I've got a flex component which works pretty well but unfortunately turns into a
Well basically I've got a vb.net script connecting to IRC, and I'm working on
i am making a website using asp.net and C# and well i got stuck
I've got this code working well for months (on iOS 5.1), but I didn't
Well i got alot of posts in my stream but when i do: SELECT
I got this code from someone and it works very well, I just want
I've got an after insert trigger that works well. However, I want it to
At my asp.net project I use telerik asp.net ajax controls set. so at my
Well i got a page that sends emails and everything runs fine in the
Buiding MVC3 solution went well but have got an error in browser: Compiler Error

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.