Fork me on GitHub

perf 2.0.95

node:

Attribute

mixer
perf 2.0.95
category
Image
{
Overview

format specifies the format for the image in question.

Configures the format parameter for the image in question. Does not modify the attribute directly. Instead, it should be called within a optimize_image yield. The optimize_image function does the actual modifications. Valid options include gif (non-animating), jpeg, png, and webp

*
Argument
Type
Name
Text %format
»
View Source
node:

Attribute

mixer
perf 2.0.95
category
Image
{
Overview

height specifies the height modifier for the image in question.

Configures the height parameter for the image in question. Does not modify the attribute directly. Instead, it should be called within a optimize_image yield. The optimize_image function does the actual modifications.

*
Argument
Type
Name
Text %height
»
View Source
node:

Attribute

mixer
perf 2.0.95
category
Image
{
Overview

quality specifies the width modifier for the image in question.

Configures the quality parameter for the image in question. Does not modify the attribute directly. Instead, it should be called within a optimize_image yield. The optimize_image function does the actual modifications. Quality should be a float between 0 and 100. 100 is the highest quality, but is not recommended - images usually are larger than their source images at that setting. A good place to start is 70 - usually you cannot see a visual difference at that level.

*
Argument
Type
Name
Text %quality
»
View Source
node:

Attribute

mixer
perf 2.0.95
category
Image
{
Overview

width specifies the width modifier for the image in question.

Configures the width parameter for the image in question. Does not modify the attribute directly. Instead, it should be called within a optimize_image yield. The optimize_image function does the actual modifications.

*
Argument
Type
Name
Text %width
»
View Source
node:

XMLNode

mixer
perf 2.0.95
category
Javascript
{
Overview

add_ignore_domain adds a domain to a blacklist so that it will not be bundled

Call this function in the scope opened by optimize_all_js to set a domain which will not be bundled by the optimizer (this will also terminate the chain of scripts)

You can ignore multiple domains by calling this function multiple times in a scope, we concat the new ignore domain to the list of excluded domains each time

*
Argument
Type
Name
Text %domain_name
»
View Source
node:

XMLNode

THE
async_js()
FUNCTION
mixer
perf 2.0.95
category
Javascript
{
Overview

async_js configures the optimized JS to be loaded asynchronously

async_js configures the optimized JS to be loaded asynchronously It applies to the new bundled script tag, not the existing script tags.

*
This function has no arguments
»
View Source
node:

XMLNode

mixer
perf 2.0.95
category
Javascript
{
Overview

clear_ignore_domain

clear_ignore_domain resets the blacklist of domains we will not bundle.

*
This function has no arguments
»
View Source
node:

XMLNode

THE
defer_js()
FUNCTION
mixer
perf 2.0.95
category
Javascript
{
Overview

defer_js configures the optimized JS to be loaded asynchronously

defer_js configures the optimized JS to be loaded asynchronously It applies to the new bundled script tag, not the existing script tags.

*
This function has no arguments
»
View Source
node:

XMLNode

THE
optimize_all_js()
FUNCTION
mixer
perf 2.0.95
category
Javascript
{
Overview

optimize_all_js bundles all adjacent js on a page.

This function finds all adjacent javascript and bundles the JS. It does this by using the Moovweb js bundling service, which takes as input a list of urls (in query parameters) and returns the concatenated JS.

*
This function has no arguments
»
View Source
node:

Attribute

THE
optimize_image()
FUNCTION
mixer
perf 2.0.95
category
Image
{
Overview

optimize_image modifies the image's src attribute to optimize the image

The src attribute is modified to point at the image optimization service (opt.moovweb.net/img...) The query parameters specify how to optimize the image.

*
This function has no arguments
»
View Source
node:

Attribute

mixer
perf 2.0.95
category
Image
{
Overview

optimize_image modifies an image's attribute to optimize the image

Same functionality as the optimize_image function, but lets you specify which attribute to set. Most often this is used in combination w image deferral, when the image's src is renamed as data-src so that the image doesn't get requested on load.

*
Argument
Type
Name
Text %width
»
View Source
mixer
perf 2.0.95
category
Javascript
{
Overview

set_ignore_attribute specify an attribute that serves as a flag that indicates the script will not be bundled

Call this function in the scope opened by optimize_all_js to set an attribute which will not be bundled by the optimizer (this will also terminate the chain of scripts)

*
Argument
Type
Name
Text %attribute_name
»
View Source