- You may set various constants or edit the TypoScript to fit the optimization to your needs
Property: | Data type: | Description: | Default: |
|---|---|---|---|
enabled | boolean | Is the optimization enabled for this template | 1 |
replaceClearGif | boolean | Replace the clear.gif with another filename eg. 1.gif. Leave the field blank to ignore this setting. | [empty] |
emtpyBodyTag | boolean | Remove all attributes from the body-tag like bgcolor="#FFFFFF". You can reach the same result with typo-script. You may clean up the bodytag, as long you don't use for JS and may define the body-tag with CSS | 1 |
removeGenerator | boolean | Remove <meta name="generator" content="Typo 3.3 CMS"> | 1 |
removeLinkSchema | boolean | Remove <LINK REL="schema.dc" HREF="http://purl.org/metadata/dublin_core_elements"> | 1 |
removeEmptyAltAtr | boolean | Remove alt-attributes of images if they are empty | 0 |
removeRealUrlBrokenRootLink | Boolean | RealUrl produces under some conditions links like: href=".html” these are changed to: href=”" | 1 |
removeBlurScript | boolean | Removes the script in the head that defines the blur-function and also removes the "onFocus="blurLink(this);"" of tags; May cause problems if you work with JS and some menu-types. | 1 |
removeComments | boolean | Use this option on your own risk - it may cause problems with Javascript and will definitly cause problems if you use external PHP-Files with the PHP_SCRIPT_EXT-object and if you use spamProtection. The original Typo3-Copyright is spared out by default even when you remove the comments from the head Options: 0 = don't remove any comments 1 = only in body 2 = everywhere 3 = only in the head | 2 |
keepComment | array | Array with regular expressions that match comments that should not be removed. Very useful e.g. to keep the TYPO3SEARCH-Comments so indexed_search can work properly To remove the Typo3 copyright you can delete this line in the default TS. But notice that it is not nice to Kasper and the Typo3 community. So maybe when you remove this comment you insert an alternative comment with this information via TS:source_optimization.headerComment | .10 = /^TYPO3SEARCH_/usi .99 = /This website is powered by TYPO3/usi .20 = /^\[if/usi |
headerComment | String | An additional Header comment just above the TYPO3 Header comment. In contrast you can add your information to the top of the original TYPO3 header with TS:config.headerComment = | [EMPTY] |
formatHtml | integer | Formats the code beautiful and easy readable. New lines and tabs are used in the usual way of illustrating the structure of an XML code. This is a great help for developing and checking the code (Option 4 or 5) as well as compressing the code that it is faster transferred to the user agent (Option 1 or 2). Options: 0 = off 1= no line break at all (code in one line) 2 = minimalistic line breaks (structure defining box-elements) 3 = aesthetic line breaks (important box-elements) 4 = logic line breaks (all box-elements) 5 = max line breaks (all elements) – not recommended! | 4 |
tabSize | integer | Defines the size of the tabs used for formating. If blank one tab is used. If a number is specified the specified number of blank spaces is used instead. This will only work together with formatHtml | [EMPTY] |
debugComment | boolean | Includes a comment at the end of the html source code that points the numbers of open html tags. This will only work together with formatHtml | 0 |
replaceDoctype | string | Replace <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> with a string; leave blank for leaving alone Still working but obsolete : Please use instead: TS:doctype = xhtml_trans | [EMPTY] |
alternateHtmlXhtmlLanguage | string | Alternate the language in the html-tag if xhtml-optimization is enabled. Example: If you enable xhtml in your template by "page.config.doctype = xhtml_trans" typo outputs "<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">" instead of "<html>"; this option lets you alternate the language between xml:lang="en" and lang="en". (Feature requested by Tobias Weiblen) Still working but obsolete : Please use instead: TS:config.htmlTag_langKey = en | [EMPTY] |
moveInlineCss | boolean | Cut out the inline-css, create an external css-file, paste all the inline-css in this file and create a reference in the document. Automatic check if the inline-css has changed. If the css hasn't changed, the css-file won't be updated so the browser won't request the file again from the server (similar to a cache-functionality). Notice, this functionality will only work, if TS:config.inlineStyle2TempFile = 0 Still working but obsolete : Please use instead TS:config.inlineStyle2TempFile = 1; or the “scriptmerger” extension. Only advantage of this is the option to choose the filename | 0 |
moveInlineCss.file | string | Path and filename realitve to your webroot. If the file doesn't exists it will be created. If the directory doesn't exists you'll get a message via the debug-function. Still working but obsolete : see above | fileadmin/style.css |
moveInlineCss.media | string/stdWrap | Enables to specify the media for the css file. Still working but obsolete : see above | all warp = | |
To set an option use the Constant Editor or set options in the Constants field of your template:
source_optimization.enabled = 1source_optimization.formatHtml = 2
Or edit the TypoScript:
config.source_optimization.enabled = 1config.source_optimization.formatHtml = 2