Any preferably open source html compressor written in Javascript?

176 views Asked by At

I am looking for an HTML compressor/minimizer written in Javascript. Say, I have a Javascript variable containing some HTML code, I want to pass it to a Javascript function that will remove unecessary spaces, comments, etc... Does such tool exist? I can't find any...

1

There are 1 answers

1
A_AR On

Is there a specific reason for a javascipt minimizer?

If you are worried about your website loading time, then why not try head.js()?

You can see the change if you have a large number of libraries.

But if you have really want to minify, there is AJAX minifier

I used it just now and works wonderful.