Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.ResponseFilter.WhiteSpaceResponseFilter.Compress Method

Compresses the HTML input buffer which is normally the complete page.

Class: YetaWF.Core.ResponseFilter.WhiteSpaceResponseFilter
Namespace: YetaWF.Core.ResponseFilter
Assembly: YetaWF.Core

Syntax

public static string Compress( string inputBuffer );

Parameters

inputBuffer

The input buffer containing HTML to be optimized.

Return Value

Returns the compressed output.

Remarks

Removes excessive whitespace, optimizes JavaScript while preserving textarea and pre tag contents.

Optimizing is very aggressive and removes all whitespace between tags. This can cause unexpected side-effect. For example, when using spaces to add distance between objects (usually in templates, these will be lost. Such spacing must be accomplished using CSS, not space character litter.

Inside areas marked <!--LazyWSF--> and <!--LazyWSFEnd--> (Text Modules (display only)), whitespace between tags is preserved. Inside pre and textarea tags no optimization is performed.

See Also YetaWF.Core.ResponseFilter.WhiteSpaceResponseFilter ClassYetaWF.Core Overview