Any way to chunk gzip with Apache and PHP

Posted by donatJ on Stack Overflow See other posts from Stack Overflow or by donatJ
Published on 2010-05-19T18:11:40Z Indexed on 2010/05/25 22:21 UTC
Read the original article Hit count: 223

Filed under:
|
|
|
|

I have a web application on a site that takes a while (~10 seconds) to complete a portion of the page near the bottom - it has been as optimized as it can be, and caching is not an option.

We have compression enabled on the server via an .htaccess directive SetOutputFilter DEFLATE the problem is this causes the whole page to be held until completion before it starts outputting to the user, this is not optimal as the user sees nothing until the page completes.

I have also tried it via the php ob_start("ob_gzhandler"); method.

Currently I have a <FilesMatch > in my .htaccess restricting this specific script from being compressed.

Basically my question is this - Is there a way to say chunk gzip or deflate so that the user gets it in pieces, so they can see that the page has begun loading?

© Stack Overflow or respective owner

Related posts about php

Related posts about .htaccess