<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: HTML Minification</title>
	<atom:link href="http://ajaxian.com/archives/html-minification/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/html-minification</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: sbmglobal</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-281320</link>
		<dc:creator>sbmglobal</dc:creator>
		<pubDate>Wed, 31 Mar 2010 08:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-281320</guid>
		<description>this is useful tool for the SEOer, but it will not welcomed by the web designer.</description>
		<content:encoded><![CDATA[<p>this is useful tool for the SEOer, but it will not welcomed by the web designer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dariusz</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280241</link>
		<dc:creator>dariusz</dc:creator>
		<pubDate>Fri, 12 Mar 2010 15:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280241</guid>
		<description>Cool work kangax.  While I don&#039;t think a client-side or server-side-JS HTML minifier has tooooo many practical applications, it&#039;s definitely not enough to just gzip HTML, and call it a day @waltr.

Semantically stripping out stuff like comments, invalid attributes, moving inline CSS that should/could go elsewhere etc., and doing other cleanup before caching (as Ben mentioned above) is pretty great stuff.

@meandmycode, great idea re: client-side toggle</description>
		<content:encoded><![CDATA[<p>Cool work kangax.  While I don&#8217;t think a client-side or server-side-JS HTML minifier has tooooo many practical applications, it&#8217;s definitely not enough to just gzip HTML, and call it a day @waltr.</p>
<p>Semantically stripping out stuff like comments, invalid attributes, moving inline CSS that should/could go elsewhere etc., and doing other cleanup before caching (as Ben mentioned above) is pretty great stuff.</p>
<p>@meandmycode, great idea re: client-side toggle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kangax</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280214</link>
		<dc:creator>kangax</dc:creator>
		<pubDate>Thu, 11 Mar 2010 22:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280214</guid>
		<description>@BenGerrissen
Thanks. I&#039;ll take a look at Magnolia CMS. And yes, I wish more people would understand the difference between HTML and XHTML (and ultimately, pointlessness of serving xhtml-like markup in such way that browsers still end up parsing it as HTML). Even first 2 comments in this thread demonstrate some of the misconceptions floating around.

@PaulIrish
Very good point about mobile browsers :)

@V1
I&#039;d love to see your minifier. Before writing mine, I looked around but didn&#039;t find that many. And even those I found were either not as efficient as they could have been, or overly aggressive (e.g. Google&#039;s PageSpeed).</description>
		<content:encoded><![CDATA[<p>@BenGerrissen<br />
Thanks. I&#8217;ll take a look at Magnolia CMS. And yes, I wish more people would understand the difference between HTML and XHTML (and ultimately, pointlessness of serving xhtml-like markup in such way that browsers still end up parsing it as HTML). Even first 2 comments in this thread demonstrate some of the misconceptions floating around.</p>
<p>@PaulIrish<br />
Very good point about mobile browsers :)</p>
<p>@V1<br />
I&#8217;d love to see your minifier. Before writing mine, I looked around but didn&#8217;t find that many. And even those I found were either not as efficient as they could have been, or overly aggressive (e.g. Google&#8217;s PageSpeed).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meandmycode</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280171</link>
		<dc:creator>meandmycode</dc:creator>
		<pubDate>Wed, 10 Mar 2010 20:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280171</guid>
		<description>@waltr, if you are gzipping theres no reason not to continue, this basically removes white space and redundant data (such as comments), so this would be something you additionally do (js is generally minified and served gzipped).

As for reading the html, it is imo that minification should be part of a compilation process, be that at deployment or at first run (if you have a more sophisticated runtime (which most sites do these days)), this way you continue to enjoy the source files for dev time, but produce a &#039;compiled&#039; result for machine communication.

If you do find yourself in the situation you need to debug the live sites generated data you should consider having a toggle on the app (such as Debug/Release).</description>
		<content:encoded><![CDATA[<p>@waltr, if you are gzipping theres no reason not to continue, this basically removes white space and redundant data (such as comments), so this would be something you additionally do (js is generally minified and served gzipped).</p>
<p>As for reading the html, it is imo that minification should be part of a compilation process, be that at deployment or at first run (if you have a more sophisticated runtime (which most sites do these days)), this way you continue to enjoy the source files for dev time, but produce a &#8216;compiled&#8217; result for machine communication.</p>
<p>If you do find yourself in the situation you need to debug the live sites generated data you should consider having a toggle on the app (such as Debug/Release).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: waltr</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280170</link>
		<dc:creator>waltr</dc:creator>
		<pubDate>Wed, 10 Mar 2010 19:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280170</guid>
		<description>What benefits would this approach have over GZipping the output?</description>
		<content:encoded><![CDATA[<p>What benefits would this approach have over GZipping the output?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: V1</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280169</link>
		<dc:creator>V1</dc:creator>
		<pubDate>Wed, 10 Mar 2010 19:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280169</guid>
		<description>HTML minifiers have been around for a long time. And yes even in written in JavaScript. I have written one about a year ago for Aptana Jaxer, so i really don&#039;t see what is new about this or different.. or why this is even news. Its not ground breaking...</description>
		<content:encoded><![CDATA[<p>HTML minifiers have been around for a long time. And yes even in written in JavaScript. I have written one about a year ago for Aptana Jaxer, so i really don&#8217;t see what is new about this or different.. or why this is even news. Its not ground breaking&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulIrish</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280166</link>
		<dc:creator>PaulIrish</dc:creator>
		<pubDate>Wed, 10 Mar 2010 16:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280166</guid>
		<description>It&#039;s amusing to watch javascript developers bicker over 10 bytes of JS when HTML has so much room for optimization, not to mention it&#039;s required on each page view, whereas JS stays cached.  
This minifier is a great new tool; I&#039;m looking forward to seeing people hooking it up to some automated build processes or output hooks.</description>
		<content:encoded><![CDATA[<p>It&#8217;s amusing to watch javascript developers bicker over 10 bytes of JS when HTML has so much room for optimization, not to mention it&#8217;s required on each page view, whereas JS stays cached.<br />
This minifier is a great new tool; I&#8217;m looking forward to seeing people hooking it up to some automated build processes or output hooks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WillPeavy</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280164</link>
		<dc:creator>WillPeavy</dc:creator>
		<pubDate>Wed, 10 Mar 2010 15:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280164</guid>
		<description>Here&#039;s another HTML minifier: http://willpeavy.com/minifier/</description>
		<content:encoded><![CDATA[<p>Here&#8217;s another HTML minifier: <a href="http://willpeavy.com/minifier/" rel="nofollow">http://willpeavy.com/minifier/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blepore</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280162</link>
		<dc:creator>blepore</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280162</guid>
		<description>Wow, congrats on getting the single line version of IE&#039;s conditional comments working. I saw the comment saying that conditional comments worked but very few people even know about/check the single line form.

PLEASE make a setting to disable HTML validation/attribute removal. I use HTML Tidy to process our content server side, but the amount of hoops I&#039;ve had to jump through to support ARIA, WebForms 2, new HTML5 elements, HTML5 custom data attributes, etc. has made me start to rethink the whole server-side processing thing. I&#039;ve not come across a parser that will support these things. It&#039;s almost maddening :(</description>
		<content:encoded><![CDATA[<p>Wow, congrats on getting the single line version of IE&#8217;s conditional comments working. I saw the comment saying that conditional comments worked but very few people even know about/check the single line form.</p>
<p>PLEASE make a setting to disable HTML validation/attribute removal. I use HTML Tidy to process our content server side, but the amount of hoops I&#8217;ve had to jump through to support ARIA, WebForms 2, new HTML5 elements, HTML5 custom data attributes, etc. has made me start to rethink the whole server-side processing thing. I&#8217;ve not come across a parser that will support these things. It&#8217;s almost maddening :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobKoberg</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280159</link>
		<dc:creator>RobKoberg</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:25:47 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280159</guid>
		<description>And here it is escaped:

&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;2.0&quot;&gt;
  &lt;xsl:strip-space elements=&quot;*&quot;/&gt;
  &lt;xsl:output indent=&quot;no&quot; method=&quot;xhtml&quot;/&gt;
  &lt;xsl:template match=&quot;@*&#124;node()&quot;&gt;
    &lt;xsl:copy&gt;
      &lt;xsl:apply-templates select=&quot;@*&#124;node()&quot;/&gt;
    &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</description>
		<content:encoded><![CDATA[<p>And here it is escaped:</p>
<p>&lt;xsl:stylesheet xmlns:xsl=&#8221;http://www.w3.org/1999/XSL/Transform&#8221; version=&#8221;2.0&#8243;&gt;<br />
  &lt;xsl:strip-space elements=&#8221;*&#8221;/&gt;<br />
  &lt;xsl:output indent=&#8221;no&#8221; method=&#8221;xhtml&#8221;/&gt;<br />
  &lt;xsl:template match=&#8221;@*|node()&#8221;&gt;<br />
    &lt;xsl:copy&gt;<br />
      &lt;xsl:apply-templates select=&#8221;@*|node()&#8221;/&gt;<br />
    &lt;/xsl:copy&gt;<br />
  &lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobKoberg</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280158</link>
		<dc:creator>RobKoberg</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280158</guid>
		<description>Here is an XSL version:



  
  
  
    
      
    
  
</description>
		<content:encoded><![CDATA[<p>Here is an XSL version:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280155</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Wed, 10 Mar 2010 13:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280155</guid>
		<description>@kangax, though established HTML minifiers are generally build by clueless backend developers who think HTML equals XML and tend to put a SAX parser in there somewhere... grrr, though the Magnolia team *fixed* that since Magnolia 3.0 I believe.</description>
		<content:encoded><![CDATA[<p>@kangax, though established HTML minifiers are generally build by clueless backend developers who think HTML equals XML and tend to put a SAX parser in there somewhere&#8230; grrr, though the Magnolia team *fixed* that since Magnolia 3.0 I believe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280154</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Wed, 10 Mar 2010 13:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280154</guid>
		<description>@kangax, Magnolia CMS already uses a HTML minifier (some other CMS systems as well) I suggest you track those down and &#039;borrow/port&#039; algorithms.
.
@rest, HTML minifiers are generally used to optimize pages before serverside caching. This is commonly abstracted away from developers and adopted by platforms (CMS/CRM/Portals). My guess would be that Kangax is building this for server side JS. It has zero value for development unless you deploy sites as raw html files.
.
As usual, the scope is grander then most ajaxian readers comprehend or care about.</description>
		<content:encoded><![CDATA[<p>@kangax, Magnolia CMS already uses a HTML minifier (some other CMS systems as well) I suggest you track those down and &#8216;borrow/port&#8217; algorithms.<br />
.<br />
@rest, HTML minifiers are generally used to optimize pages before serverside caching. This is commonly abstracted away from developers and adopted by platforms (CMS/CRM/Portals). My guess would be that Kangax is building this for server side JS. It has zero value for development unless you deploy sites as raw html files.<br />
.<br />
As usual, the scope is grander then most ajaxian readers comprehend or care about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iliad</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280153</link>
		<dc:creator>iliad</dc:creator>
		<pubDate>Wed, 10 Mar 2010 12:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280153</guid>
		<description>I gotta say, call me old fashioned but I like my HTML readable :)</description>
		<content:encoded><![CDATA[<p>I gotta say, call me old fashioned but I like my HTML readable :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sixtyseconds</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280151</link>
		<dc:creator>sixtyseconds</dc:creator>
		<pubDate>Wed, 10 Mar 2010 12:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280151</guid>
		<description>...or for that matter, why would they use event attributes?</description>
		<content:encoded><![CDATA[<p>&#8230;or for that matter, why would they use event attributes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sixtyseconds</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280150</link>
		<dc:creator>sixtyseconds</dc:creator>
		<pubDate>Wed, 10 Mar 2010 12:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280150</guid>
		<description>...and; what serious developer is going to use both depreciated html content AND an html parser/checker?</description>
		<content:encoded><![CDATA[<p>&#8230;and; what serious developer is going to use both depreciated html content AND an html parser/checker?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: halan</title>
		<link>http://ajaxian.com/archives/html-minification/comment-page-1#comment-280149</link>
		<dc:creator>halan</dc:creator>
		<pubDate>Wed, 10 Mar 2010 11:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8697#comment-280149</guid>
		<description>A tool for convert valid html to invalid html?</description>
		<content:encoded><![CDATA[<p>A tool for convert valid html to invalid html?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

