MTOptimizeHTML 1.0

June 19, 2003 - updated February 8, 2006 (Download)

Container tag that reduces the size of your HTML page by stripping out unneccessary white space, HTML comments, etc.

The plugin requires that your have the HTML::Clean perl module installed.

  • MTOptimizeHTMLVersion

    Returns the version of this plugin.
  • MTOptimizeHTML

    Container tag that should be placed around your entire document. It supports the following option:

    • whitespace = “1”

      Removes white space. The default is whitespace=”1”
    • shortertags = “1”

      Converts strong to b, etc. The default is shortertags=”0”
    • blink = “1”

      Removes blink tags. The default is blink=”0”
    • contenttype = “1”

      Removes default content type. The default is contenttype=”1”
    • comments = “1”

      Removes excess HTML comments. Comments inside of style and script tags are not affected. The default is comments=”1”
    • entities = “1”

      Changes HTML entities to numeric values and changes " to quot;. The default is entities=”0”
    • dequote = “1”

      Removes quotes from tag parameters when possible—not recomended if you want complient HTML. The default is dequote=”0”
    • defcolor = “1”

      Recodes numeric colors to in shorter form (i.e. #ffffff is changed to white). The default is defcolor=”1”
    • javascript=”1”

      Removes excess spaces and newlines in javascript code. The default is javascript=”1”
    • htmldefaults = “1”

      Removes default attributes for some HTML tags. The default is htmldefaults=”0”
    • lowercasetags = “1”

      Translated all HTML tags to lower case. The default is lowercasetags=”1”
    • meta = “GENERATOR AUTHOR”

      Takes a space separated list of meta tags to remove. The default is meta=”GENERATOR FORMATTER”
    • emptytags = “b i span center”

      Takes a space separated list of tags to remove when there is no
      content between the start and end tag, like this: <b></b>.
      The default is emptytags=”b i font center”

Example: Optimize the HTML of a page using the default settings.

<MTOptimizeHTML>
<html>
<head>
...
...
</body>
</html>
</MTOptimizeHTML>