The Old Man Posted June 5, 2015 Posted June 5, 2015 Hi folks.Would appreciate your insight. A few years ago I added the following lines of code to the first lines of all my PHP/Xhtml Transitional based web pages (nothing to do with IPS Suite).<?php ob_start( 'ob_gzhandler' ); ?>I also renamed by CSS sheets to end in php file extention and added these lines of code to them, so that they would be gzipped as well:<?php ob_start ("ob_gzhandler"); header("Content-type: text/css; charset: UTF-8"); header("Cache-Control: must-revalidate"); $offset = 60 * 60 ; $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; header($ExpStr); ?> These 2 actions gave some great compression and speed reduction results on my websites. Due to increasing work commitments, I haven't been able to keep up to date with web design/development as I used to, and I'm catching up. Is this still the best way to do it? Or has it been superseded by newer best practice methods like using .htacess?Many thanks.Regards,Graham
The Jimmo Posted June 5, 2015 Posted June 5, 2015 Use server-side driven compression techniques, much faster and less resources taken up
The Old Man Posted June 5, 2015 Author Posted June 5, 2015 Thanks, aren't the methods above server side?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.