Last Updated: February 25, 2016
·
795
· glennfriesen

Enabling Gzip Compression

Gzip compression using php is as easy as adding a single line of code at the beginning of each page.

<?php ob_start("ob_gzhandler"); ?>

Most people don't compress. Always compress. I've noted improvements in page load time across several different domains between 30% and 70% faster; just from installing gZip.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside