1

I need to minify html code to improve my website performance using PHP

I'm using Yii PHP Framework / Apache.

Abudayah
  • 3,816
  • 7
  • 40
  • 60
  • 7
    Sounds awesome. Do it. – Leigh Jul 21 '12 at 00:51
  • 2
    Minification is to reduce how long it takes the browser to download a file. Performance problems in PHP code are more likely to be caused by the code taking too long to *run* on the server, which has nothing to do with how fast the browser can download the output. Are you sure that minification will solve the right problem? – Wyzard Jul 21 '12 at 00:56
  • @Wyzard what if I have good server ? – Abudayah Jul 21 '12 at 01:05
  • 1
    Are you already gzipping all your content and assets? I feel like there are much better ways to improve performance than minifying html source. – troynt Jul 21 '12 at 01:09
  • 1
    @AnasA Good server doesn't mean good code. – ceejayoz Jul 21 '12 at 01:50
  • possible duplicate of [How to minify php page html output?](http://stackoverflow.com/questions/6225351/how-to-minify-php-page-html-output) – Abudayah Mar 13 '14 at 13:14

2 Answers2

2

I used PageSpeed Module from google it's really great

Abudayah
  • 3,816
  • 7
  • 40
  • 60