oni-kun Posted December 15, 2009 Share Posted December 15, 2009 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 More sharing options...
corbin Posted December 15, 2009 Share Posted December 15, 2009 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. Link to comment https://forums.phpfreaks.com/topic/185174-compress-huge-page-w-output-buffer/#findComment-977494 Share on other sites More sharing options...
oni-kun Posted December 15, 2009 Author Share Posted December 15, 2009 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. Link to comment https://forums.phpfreaks.com/topic/185174-compress-huge-page-w-output-buffer/#findComment-977496 Share on other sites More sharing options...
corbin Posted December 15, 2009 Share Posted December 15, 2009 No problem . You could also look at using mod_deflate on an Apache level so all text content is compressed (HTML, JS, CSS, so on). Link to comment https://forums.phpfreaks.com/topic/185174-compress-huge-page-w-output-buffer/#findComment-977506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.