I never really dug into the compression options I have for my plugins and themes, so here I am. I was reading a few articles about PHP compression like this one and I had a question.
Is it really as easy as adding the following code in the appropriate spot?
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler");
else
ob_start();
?>
I definitely want to learn more about compression as we all know the benefits of it, but I am unsure exactly where to start. Any suggestions?
Are there better ways to effectively reduce the load time for my plugins and themes? It’s not that I’m having a problem with a particular piece of code, I just would like to expand my knowledge on the subject.
I am speaking in terms of a plugin or theme that would be used by many people, so this compression process would (hopefully) be sort of ‘automatic’, without having the user mess with their server configuration.