I created a site using CodeIgniter, all is well. I tested the performance of my site using YSlow (Google Chrome App), and some of the results were graded A. However, I have a F grade in this area “Compress components using gzip”. It pertains to my css and js files, most were found in <head>. I am not that advance so that’s why I don’t have an idea how to address this.
I created a site using CodeIgniter, all is well. I tested the performance of
Share
You can find the answer to that in the documentation: http://developer.yahoo.com/performance/rules.html#gzip
But, in a nutshell, to save time sending data across a network, you compress it in your web server, and then uncompress it in the web browser. Note that these functions are prporeties of the web server (Apache / IIS) and web browser (IE, Chrome, Firefox) and NOT properties at the application level. In otherwords, you can’t fix it in Code Igniter. Here’s the docs for apache, but if you’re in IIS then you can do similar.
You can still optimise your JS and CSS files by compressing them without adjusting anything on the web server – they still end up as plain text but you shorten variable names, remove newlines and so on. Here is Yahoo’s tools for reducing file size where you probably should start. There’s also an on-the-fly mod just released for Apache (by Google) that you could use.