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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.