Compressing HTML
Compress might not be the right word, as it doesn't really compress / zip the output HTML code, but combines all the HTML lines to a single line and removes trailing / leading whitespaces.
This has to be your index.php and am assuming you are routing all incoming page requests to index.php which will be handled by either rewrites in htaccess or direct query strings. For example, I would have either
RewriteRule ^about\/vision$ index.html?page=about-vision [QSA,L]
or RewriteRule ^register$ index.php?module=Register
There is one gotcha in this. You can't use single line comments start with // in inline Javascript code in the HTML. Either place the JavaScript code outside of the HTML page, in separate .js page or use multi-line comments /* */
php | Thursday, August 06, 2015 |
0 comments:
Post a Comment