Variables

TIDEngine Javascript Cache Settings

Variables

 $optimize_javascript = true
 $combine_all_javascript = true
 $compact_javascript = true
 $optimize_javascript_gz = true
 $packer = 'jsmin'
 $js_ext = '.js'
 $javascript_combined = 'combined'
 $javascript_filename = 'javascript'
 $framework_filename = 'framework'
 $frameworks_type = 'minified'

Detailed Description

TIDEngine different Javascript Cache Settings.

Your Pages performance depends from this settings. We recomend to use Default settings for best results.

But anyway you could make experiments and adjust by your needs. This settings are applied just to Javascript Cache files.


Variable Documentation

$optimize_javascript = true [inherited]

Use Javascript optimization. Clean Javascript files and put all code in one line - size reduction. This means we will use some of external Javascript Packers.

Parameters:
bool$optimize_javascript

Definition at line 303 of file TIDEngine.php.

$combine_all_javascript = true [inherited]

Combine all Javascript and Javscript Frameworks files in one file. If we use this option all Javascript files will be treated as native Javascript files.
Compress Javascript files - Reduces the number of HTTP requests.

Parameters:
bool$combine_all_javascript

Definition at line 312 of file TIDEngine.php.

$compact_javascript = true [inherited]

Combine all Javascript files in two files, one for native Javascript source files and other for Javscript Frameworks Files.
Compress Javascript files - Reduces the number of HTTP requests.

If $combine_all_javascript are enabled this setting will have no effects.

Parameters:
bool$compact_javascript

Definition at line 321 of file TIDEngine.php.

bool $optimize_javascript_gz = true [inherited]

Use gzip compression on Javascript Cache files . Compress Javascript files - size reduction.

Definition at line 328 of file TIDEngine.php.

$packer = 'jsmin' [inherited]

Optimize Javascript files, by using some of build in Javascript Packers.
You must realize that every time you use Javascript Optimization you will have high server load, and long response time.

Workarround for this is to create minified versions of Javascript Frameworks files. Or to create them on Localhost.

By default TIDEngine checks if there are minified version of Javascript files during first time load and if they
do not exist create them, so you will have high Server load just once during creation of minified version of
Javascript files. When you have minified version of Javascript files there are no high Server load.
If you do not have Javascript changes you could just:

  • set $cache_lifetime = 'permanent'; and
  • change .httacces file lines 1 month to 1 year:

                              ExpiresByType application/javascript "access plus 1 month"
                              ExpiresByType application/x-javascript "access plus 1 month"
    
Parameters:
string$packer,:
  • packer - PHP 5 ported version of Dean Edwards Packer
  • jsmin - JSmin packer PHP ported version of Dean Edwards JSmin
  • jshrink - JShrink-0.2.class.php hosted on Google Code
  • jsminplus - one more port of Dean Edwards JSmin
  • native - TIDEngine native compressor based on regular Expressions - Not finished.

Definition at line 352 of file TIDEngine.php.

$js_ext = '.js' [inherited]

Set default Javascript extension. Look sily but we need that for Safari gzip bug. Safari acceprt default extension for gzipped files in format .js.gz.js or .css.gz.css*

Parameters:
string$js_ext

Definition at line 360 of file TIDEngine.php.

$javascript_combined = 'combined' [inherited]

New combined javascript file name. When we use combinig all Javascript files into one.

Parameters:
string$javascript_combined

Definition at line 367 of file TIDEngine.php.

$javascript_filename = 'javascript' [inherited]

New combined javascript file name. When we combine native Javascript files ad one Cache file and Frameworks as second..

Parameters:
string$javascript_filename

Definition at line 374 of file TIDEngine.php.

$framework_filename = 'framework' [inherited]

New combined frameworks file name. When we combine native Javascript files ad one Cache file and Frameworks as second..

Parameters:
string$framework_filename

Definition at line 382 of file TIDEngine.php.

$frameworks_type = 'minified' [inherited]

If Framework type in use.

Parameters:
string$frameworks_type,:
  • source - If we use source - no minified versions of Javascript will be created.
  • minified - If we use minified - minified versions of all Javascript will be created.

Definition at line 391 of file TIDEngine.php.