CFJAVASCRIPT

Intelligently manage Javascript files by collecting multiple files together and on-the-fly optimizing them to reduce their size and readability. Either compile Javascript inline or as a <script src=''> tag. It will only include Javascript files once per page request, even if they are specified multiple times in multiple tags throughout the page request.

Usage

<cfjavascript>

Attributes

Attribute default required summary
SRC A comma-separated list or array of Javascript files to manage. If omitted then use a closing tag, and place the Javascript inside the tag
MUNGE true Flag to control whether or not to rename the Javascript variables and function names to reduce the readability of the resulting block
MINIMIZE true Flag to control whether the resulting Javascript block is to be optimized removing all whitespace, comments and line breaks
OUTPUT INLINE Controls where the resulting Javascript gets placed in the HTML file. Values are 'INLINE', 'HEAD' or 'BODY'. This lets you put the result in the HEAD of the page, or at the end of the page for faster loading
CHARSET utf-8 The character set of the Javascript files
PATH current path The path for the link to be seen to be coming from