Search code examples
php.htaccessgzipdeflatechunked

Any way to chunk gzip with Apache and PHP


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?


Solution

  • I would say: no. I think there is now way provided by HTTP.