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 8343861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:11:43+00:00 2026-06-09T06:11:43+00:00

This Question is Related to my earlier post here: CSS loading issue with Android

  • 0

This Question is Related to my earlier post here:
CSS loading issue with Android ICS.

Where I was facing issue with CSS and JS rendering by Android ICS’s default and Dolphin browser. This content is served from my Server’s Backend Engine, Which uses (Apache2 + FastCGI + Python) setup.

While searching for possible problems, I found that main cause for problem was, content was NOT sent in compressed form from Server.

So sample Response Header looks something as follows:

Connection  Keep-Alive
Content-Encoding    gzip
Content-Length  5997
Content-Type    text/css
Date    Sun, 29 Jul 2012 14:29:08 GMT
Keep-Alive  timeout=15, max=100
Server  Apache (Ubuntu)
Vary    Accept-Encoding

and If Same content is served from flat file. Response header looks something as below. Which is rendered properly by all Browsers.

Accept-Ranges   bytes
Connection  Keep-Alive
Content-Encoding    gzip
Content-Length  1430
Content-Type    text/css
Date    Sun, 29 Jul 2012 14:28:57 GMT
Etag    "a9c06-176d-4c5e693c2a6c0"
Keep-Alive  timeout=15, max=100
Last-Modified   Sat, 28 Jul 2012 16:46:59 GMT
Server  Apache (Ubuntu)
Vary    Accept-Encoding

and Some How, Android ICS’s default and dolphin Browser are not able to render the content (Specially css, js content). It works with all other Browsers.

But Essentially, there is some problem with Backend engine also because of which uncompressed data is sent. There are few Interesting points here to look, in Response header:

  1. Response Header contains field that says “Content-Encoding gzip“
  2. But the Content-Length shows the length of Uncompressed version of resource.

To solve the problem I tried few small changes in Architecture, in places where I thought could be a problem cause.
I noticed, replacing the fastCGI by CGI solved my Problem and data is sent in Compressed Format now.


Problem

Though the problem is solved but I definitely want to use fastCGI. So I am looking for possible configuration changes that can solve Problem.
I have done following Arrangements in Server’s Apache settings:

  1. Enabling deflate module from Available Apache modules.
  2. My /etc/apache2/mods-enabled/deflate.conf files has following text:

    <IfModule mod_deflate.c>
              # these are known to be safe with MSIE 6
              AddOutputFilterByType DEFLATE text/html text/plain text/xml
              # everything else may cause problems with MSIE 6
              AddOutputFilterByType DEFLATE text/css
              AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
              AddOutputFilterByType DEFLATE application/rss+xml
    </IfModule>
    
  3. I have following lines to make fastCGI work with my script in /etc/apache2/sites-enabled/default file.

    <Files my_script_name.py>
        SetHandler fastcgi-script 
    </Files>
    
    FastCgiServer /path_to_script/my_script_name.py -processes 4 -socket /tmp/my_script_name.sock
    

Question

I tried various configuration changes But None of them seems to be solving my Problem. Is there any thing that I am missing here to Enable compression with fastCGI?

  • 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-06-09T06:11:45+00:00Added an answer on June 9, 2026 at 6:11 am

    Finally, I was able to find the solution of problem here:
    http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi

    Here, For answer of a Question: Why is my application so slow, serving blank pages, and/or acting unexpededly? in FAQ section, they clearly say that.

    mod_fastcgi and mod_deflate do not coexist well under certain versions
    of apache (Debian Lenny stock packages for example). A workaround is
    to not load the deflate module. An alternative solution is to build
    and install a recent snapshot version of mod_fastcgi (found at
    http://www.fastcgi.com/dist/).

    So as suggested on post, I updated libapache2-mod-fastcgi package on Server and now I am getting compressed data at client side with correct Response header values.

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

Sidebar

Related Questions

This question is related with one of my earlier questions.. Previous Post In there
This question is related to my earlier question, asked here: How do I get
This is related to this question I asked earlier about syntax highlighting user-defined blocks
This is a related question to one I posted earlier... I'm trying to sum
This is a related question to one I posted earlier today, I was initially
This is related to an earlier question by a different user, asking How to
This is related to my earlier question. ren C:\Temp\%%A %%A if errorlevel 0 (
This question is related to the one I asked here . I'm trying to
This is related to an earlier question I asked, where the answer was: If
This is related to an earlier question of mine. I want to have a

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.