Ruby gem for compressing html
HTML Ruby
Switch branches/tags
Pull request Compare This branch is 8 commits ahead, 10 commits behind stereobooster:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
profile
spec
.gitignore
.travis.yml
Gemfile
Rakefile
Readme.md
html_press.gemspec

Readme.md

#html_press

Build Status

how it works

Remove all whitespace junk. Leave only HTML

1.               ┌――――――――――――――――――╖        2.         ┌――――――――――――――――――╖
  ●――――――――――――――├―╢ <html> ws junk ║          ●――――――――├―――――――――╢ <html> ║
                 └――――――――――――――――――╜                   └――――――――――――――――――╜

Usage

Ruby

require 'html_press'
compressed_html = HtmlPress.press html

Jekyll

see jekyll_press

Rails

TODO ❗️

Sinatra

TODO ❗️

Command line

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

Alternatives

Additional tools

Resources

Minimize HTML

Front-end optimization