开发者

Tool for HTML whole-page minification?

I have a fairly stand-alone page, and I'd like to make it as small as possible: inline minimized Javascript and minimized CSS, and then minimize the HTML itself. There's tools for each of th开发者_Go百科ese parts, but I'd like to avoid writing the glue for putting all of these together. Open source would be ideal.


try http://code.google.com/p/htmlcompressor/

EDIT

Although doing it will make the code reading part a lot more complex and as a result, debugging will be a big pain. Do it only after you have all the other required optimization in place.


I'm not sure if you're going to find one tool that does all, but I've seen a few that do get a decent job done..... for me normally combined with other tools though.

http://code.google.com/speed/page-speed/ Page speed is a firefox plugin, and is also an apache module

When you run Page Speed against a page referencing HTML files, it automatically runs the Page Speed HTML compactor (which will in turn apply JSMin and cssmin.js to any inline JavaScript and CSS) on the files and saves the minified output to a configurable directory


Check out the Pretty Diff tool at http://prettydiff.com/?m=minify&html

You can also tell the tool to point to a given page with the s parameter, such as:

http://prettydiff.com/?m=minify&html&s=https://stackoverflow.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜