HTML online minimizer/compressor? [closed]

半城伤御伤魂 提交于 2019-12-18 11:51:07

问题


Does anyone know of a good online generator to take the source code of an HTML page and compress/minimize the entire page.

Meaning, compress/minimize all embedded CSS, JavaScript and obviously the HTML of that web page while also removing unneeded HTML/CSS/JavaScript comments, spaces, tabs, etc?


回答1:


Juriy Zaytsev wrote an HTML minifier in JavaScript, which you can use online on this page: http://kangax.github.com/html-minifier/

As the warning says, it’s still an early alpha, so there might be bugs. Use with caution!




回答2:


http://prettydiff.com/ - This is written in JavaScript so you can use it instantly in your browser.




回答3:


There's an online compressor that does minimize all embedded CSS and JavaScript blocks and also the HTML. It produces a single line output code which renders as the original and respects the document structure.

It uses Yahoo YUI Compressor and Google Closure compiler for JavaScript.

Check it here: HTMLcompressor.com




回答4:


This is the best minifier I found till date.

Check it here: Html, Javascript as well as CSS minifier




回答5:


A duplicate of https://stackoverflow.com/questions/728260/html-minification ?

And if you do not really need an ON-Line tool, then PageSpeed plugin for Firefox and the Yahho compressor are both really good minifiers. Also the PageSpeed tool can give you hints what to change, and which change will give the biggest change in speed/size.




回答6:


I came across a script that will minify your HTML, Inline CSS, Inline Javascript On The Fly.

Check here Dynamic Website Compressor




回答7:


I recommend you to try WebMarkupMin Online.




回答8:


These are the perfect minifiers:

For Javascript http://javascript-minifier.com/

For CSS http://cssminifier.com/

For PNG http://pngcrush.com/

For JPEG http://jpgoptimiser.com/




回答9:


I use HTML JavaScript CSS Minifier for minify the entire HTML code (including CSS and Javascript).

You can also encrypt the Javascript parts on Javascript minifier encryptor to make it less readable but it increase the size of your file.



来源:https://stackoverflow.com/questions/1654832/html-online-minimizer-compressor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!