spooks Posted May 27, 2008 Share Posted May 27, 2008 This may be placed elswhere but I could'nt find it in this version. This dead simple mod compresses pages at the server as they delivered to the client browser (if it supports compression) using gzip. It can give upto 80% reduction in size, so speed download, there is no extra load to server. There is a option in admin, so if you have that 'on' don`t apply this to the client side. This can be done for any php document. In application_top.php both on client side & admin, near the top, after <?php add: ob_start("ob_gzhandler"); Thats it, you should notice a speed increase on loading admin pages immediatly, client pages will be faster, especially if using dial-up. I have`nt found any downside to date. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2008 Share Posted May 28, 2008 which browsers don't support gzip? Link to comment Share on other sites More sharing options...
spooks Posted May 28, 2008 Author Share Posted May 28, 2008 which browsers don't support gzip? IE 3 & older, Opera 4 & older Netscape 3 & older, and certain versions of firefox (not sure which) Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2008 Share Posted May 29, 2008 I already have this in my version of MS2.2 // if gzip_compression is enabled, start to buffer the output if ((GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4')) { if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) { if (PHP_VERSION >= '4.0.4') { ob_start('ob_gzhandler'); } else { include (DIR_WS_FUNCTIONS . 'gzip_compression.php'); ob_start(); ob_implicit_flush(); } } else { ini_set('zlib.output_compression_level', GZIP_LEVEL); } } Link to comment Share on other sites More sharing options...
spooks Posted May 30, 2008 Author Share Posted May 30, 2008 I already have this in my version of MS2.2 // if gzip_compression is enabled, start to buffer the output if ((GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4')) { if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) { if (PHP_VERSION >= '4.0.4') { ob_start('ob_gzhandler'); } else { include (DIR_WS_FUNCTIONS . 'gzip_compression.php'); ob_start(); ob_implicit_flush(); } } else { ini_set('zlib.output_compression_level', GZIP_LEVEL); } } Hi, I did mention the option in admin, which controls this bit of code, the point of this tip is to make people aware of this very handy option & how to apply it in admin as well, or any other php pages. Try it on your admin & see just how much quicker they load. ;) Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2008 Share Posted June 4, 2008 wow..i just applied this to my admin. what a difference in speed! great tip! Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2008 Share Posted June 5, 2008 Hey Spooks, thanks. Have seen that option for yonks but never touched it till now. I think load times have halved and I am using the default value of 5.. Link to comment Share on other sites More sharing options...
WoodsWalker Posted June 6, 2008 Share Posted June 6, 2008 This is way cool, Sam. Thanks! B) ~Wendy Link to comment Share on other sites More sharing options...
joebloggs Posted June 7, 2008 Share Posted June 7, 2008 Fantastic tip m8 i never knew what that was for !!!!!!!!!!!! :lol: :lol: :lol: :lol: Link to comment Share on other sites More sharing options...
dreakies Posted June 10, 2008 Share Posted June 10, 2008 Thanx! Great tip! Link to comment Share on other sites More sharing options...
cmakynen Posted June 10, 2008 Share Posted June 10, 2008 Wow - that works great - thanks! Just curious - if an old non-supporting browser opens a page with this code in it. what happens? It croaks, or it just passes over it? Link to comment Share on other sites More sharing options...
dark_tyrant Posted June 10, 2008 Share Posted June 10, 2008 What does the unsupported browsers show when using this? Link to comment Share on other sites More sharing options...
spooks Posted June 10, 2008 Author Share Posted June 10, 2008 What does the unsupported browsers show when using this? Thay wont show any differance, the server will detect the browser does'nt support compression, so will serve uncompressed pages, so the only differance will be the load speed. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
WoodsWalker Posted June 11, 2008 Share Posted June 11, 2008 Even MORE cool! B) B) Link to comment Share on other sites More sharing options...
dark_tyrant Posted June 12, 2008 Share Posted June 12, 2008 Thay wont show any differance, the server will detect the browser does'nt support compression, so will serve uncompressed pages, so the only differance will be the load speed. Interesting. Thanks for the information. Link to comment Share on other sites More sharing options...
quick Posted June 17, 2008 Share Posted June 17, 2008 I am sorry, I donot get clear myself. Hope somebody can help me out. in admin >Configuration >GZip Compression, if i set to "ture" and the level to "3", can i still add "ob_start("ob_gzhandler");" in catalog/ admin/includes/application_top.php and catalog/incule/application_top.php i just confuse i have got speed up in admin after add ob_start("ob_gzhandler");" in catalog/ admin/includes/application_top.php. Anything i have done wrong? Link to comment Share on other sites More sharing options...
spooks Posted June 17, 2008 Author Share Posted June 17, 2008 I am sorry, I donot get clear myself. Hope somebody can help me out. in admin >Configuration >GZip Compression, if i set to "ture" and the level to "3", can i still add "ob_start("ob_gzhandler");" in catalog/ admin/includes/application_top.php and catalog/incule/application_top.php i just confuse i have got speed up in admin after add ob_start("ob_gzhandler");" in catalog/ admin/includes/application_top.php. Anything i have done wrong? If you set to true as above then yes still add to catalog/ admin/includes/application_top.php as that setting has no effect on the admin side, but do not add to catalog/includes/application_top.php as that would generate an error & is not then required anyway. I hope that makes it clearer. :) Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
quick Posted June 19, 2008 Share Posted June 19, 2008 If you set to true as above then yes still add to catalog/ admin/includes/application_top.php as that setting has no effect on the admin side, but do not add to catalog/includes/application_top.php as that would generate an error & is not then required anyway. I hope that makes it clearer. :) Thanks Sam very much, your answer make me clear, i did find error when i add to catalog/includes/application_top.php. I really hope i can speed up the client side. :rolleyes: Link to comment Share on other sites More sharing options...
Guest Posted July 3, 2008 Share Posted July 3, 2008 Nice share. Thanks! Link to comment Share on other sites More sharing options...
tuliptechnologies Posted July 7, 2008 Share Posted July 7, 2008 Hello. Can anyone assist me why my website (www.firstalberta.com) is taking too long time to load the first page/time ? I applied all suggestions as stated above like turn on GZIP and reduce the image size too. Please let me know how to tune, it is taking nearly 30 to 40 sec's and i need to load the page in 1 sec. -- Thanks in Advance, Kart. Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2008 Share Posted July 7, 2008 Hello. Can anyone assist me why my website (www.firstalberta.com) is taking too long time to load the first page/time ? I applied all suggestions as stated above like turn on GZIP and reduce the image size too. Please let me know how to tune, it is taking nearly 30 to 40 sec's and i need to load the page in 1 sec. -- Thanks in Advance, Kart. get a faster internet connection, loaded in 3 secs for me. Link to comment Share on other sites More sharing options...
mrssocolov Posted July 7, 2008 Share Posted July 7, 2008 Sam - Thank you!!!!! Wonderful Tip and just what I was looking for! - Marlo Dance as if No One were Watching ~ Sing as if No One were Listening ~ And Live Life everyday as if it were Your Last! Link to comment Share on other sites More sharing options...
mrssocolov Posted July 7, 2008 Share Posted July 7, 2008 Tulip/Kart - refresh your browser. Loaded quickly for me too.... - Marlo Dance as if No One were Watching ~ Sing as if No One were Listening ~ And Live Life everyday as if it were Your Last! Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2008 Share Posted July 7, 2008 Hello. Can anyone assist me why my website (www.firstalberta.com) is taking too long time to load the first page/time ? I applied all suggestions as stated above like turn on GZIP and reduce the image size too. Please let me know how to tune, it is taking nearly 30 to 40 sec's and i need to load the page in 1 sec. -- Thanks in Advance, Kart. Your header graphic is 125KB and your total page is HUGE, including those products under "new Products." YOu really should use multiple product images, as big product pictures take forever to load and even longer to squish. Chechout the multipcs contrib. Link to comment Share on other sites More sharing options...
spooks Posted July 7, 2008 Author Share Posted July 7, 2008 Try enabling page parse time so you can see how long your server is taking to set up the page. If you want one sec, get rid of all those pics & flash at least. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.