Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An HTML compressor module for both ColdBox and ContentBox

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 builds
Octocat-spinner-32 config
Octocat-spinner-32 handlers
Octocat-spinner-32 includes
Octocat-spinner-32 layouts
Octocat-spinner-32 modules
Octocat-spinner-32 test
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 APACHE_LICENSE.TXT
Octocat-spinner-32 Application.cfc
Octocat-spinner-32 build.xml
Octocat-spinner-32 index.cfm
Octocat-spinner-32 readme.txt
Copyright 2009 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |

Author 	 :	Luis Majano
Description :

This compressor can work with any ColdBox application or as a Module for ContentBox as well.
Class that compresses given HTML source by removing comments, extra spaces and line breaks while preserving content within <pre>, <textarea>, <script> and <style> tags.

Blocks that should be additionally preserved could be marked with:
<!-- {{{ -->
<!-- }}} -->
or any number of user defined patterns.

Compressor Google Code:
Compressor API:

You can modify the module's settings so you can configure the HTML java compressor and YUI compressor.
You can also enable caching of the compressed content for added performance in your CacheBox provider of your choice:

// Compressor Settings
settings = {
	// Compress on preRender before ColdBox outputs
	renderCompressor = true,
	// Enable caching of the unique content instead of compressing on demand, done via content hashes
	renderCaching = true,
	// The CacheBox provider to store the compressed content
	renderCacheProvider = "template",
	// The default timeout of the cached templates
	renderCacheTimeout = 60,
	// The idle timeout of the cached templates
	renderCacheLastAccessTimeout = 15,
	// The rendering cache key prefix
	renderCachePrefix = "cbox-compressor",
	// Java Compressor settings
	RemoveComments = true,
	RemoveMultiSpaces = true,
	RemoveIntertagSpaces = false,
	RemoveQuotes = false,
	CompressCss = true,
	CompressJavaScript = true,
	SimpleDocType = false,
	RemoveScriptAttributes = false,
	RemoveStyleAttributes = false,
	RemoveLinkAttributes = false,
	RemoveFormAttributes = false,
	RemoveInputAttributes = false,
	SimpleBooleanAttributes = false,
	RemoveJavaScriptProtocol = false,
	RemoveHttpProtocol = false,
	RemoveHttpsProtocol = false,
	PreserveLineBreaks = false


Version 1.0
# Initial Release
Something went wrong with that request. Please try again.