Saturday, September 7, 2013

CodeIgniter - Minify HTML using hooks

12:56 PM

CodeIgniter Minify HTML

CodeIgniter - Minify HTML using hooks

Compacting HTML code, including any inline JavaScript and CSS contained in it, can save many bytes of data and speed up downloading, parsing, and execution time



Installation:

  1. Copy /application/config/hooks.php and /application/hooks/Minifyhtml.php into your application folder Project.
  2. set $config['enable_hooks'] = TRUE;
    in your application/config/config.php

Everytime you call `$this->load->view('view/view_file');`, output function in Minifyhtml Class will be used.

Written by

is a Web/Software Developer from Philippines. Who enjoys building highly dynamic systems and flexible, scalable frameworks.When not geeking out with code, Unknown can be found Playing guitar and hanging out with his friends.You can find him in +

3 comments:

  1. Data tables not displaying after using this

    ReplyDelete
  2. you can try this free online service to minify js and compress css, so it will reduce the size of web page.

    ReplyDelete
  3. Nice article. It's very helpful to me. Thank you for share with us. Can you please check my article Fix Autoptimize WP plugin JavaScript optimize issue

    ReplyDelete

 

© 2013 Ultima Scripter. All rights resevered. Designed by Templateism

Back To Top