Jump to content

Compress huge page w/ output buffer?


oni-kun

Recommended Posts

I've got a page with roughly 500KBs of data, Basically I need it all on one page.

 

I've tried adding 'ob_start('compress')' and 'ob_end_flush();' but it gives me an error at the end and i'm not sure if this is the best way.

 

Would adding ob_start('gzcompress') work well? Would I need to add a flush at the bottom? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/185174-compress-huge-page-w-output-buffer/
Share on other sites

You might want to look into ob_gzhandler.

 

It handles the dirty details automatically.

 

 

As for needing to flush at the end, you shouldn't need to as PHP should do so automatically.

 

Thank you a WHOLE lot. This is kinda fun to use, It helps me a lot.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.