Remove all whitespace junk. Leave only HTML
1. ββββββββββββββββββββ 2. ββββββββββββββββββββ
ββββββββββββββββββ’ <html> ws junk β ββββββββββββββββββββ’ <html> β
ββββββββββββββββββββ ββββββββββββββββββββ
require 'html_press'
compressed_html = HtmlPress.press html
see jekyll_press
TODO β
TODO β
TODO β
- use parser (ιΈ) instead of regexp's
- add option to convert relative urls to absolute urls (for SEO)
- ambigious ampersands for compression?
- Support other js/css minifiers (Closure, YUI compressor)
- htmlTydi
- Rack plugin
- add script to benchmark real projects like amazon or stackoverflow
- support html5 tags
- add more options
- Optimization: make substring replace based on substring length and its position in initial string
- html-minifier (js), test suite, ruby wrapper - html_minifier
- htmlcompressor (java), test suite
- PHPTal compress (php), test suite
- W3 total cache - WP plugin from smashingmagazine contains html minifier (php)
- jeanny - rename css classes and ids in css and html files
- make shorter pathes for images in css
- deadweight - remove unused css rules from css files
- csscss will parse any CSS files you give it and let you know which rulesets have duplicated declarations.
- css-spriter, sprite-factory - combine images in sprites
- resize images by size defined in html and vice versa embed size of images in html
- #1, #2 - inline small images in css
- smusher, jpegtran, optipng - losslessly minify images
- sprockets, jammit - asset bundlers
- w3c_validators
- reduce