Pagespeed Options
A list of the default Pagespeed options for Web Controls
By default, Webscale enables the following filters with the default settings as specified by Add_head.
This filter exists primarily to ensure that other filters have a place to insert new tags in the head, or that trigger on the closing-tag of the head to perform some other action.
Pagespeed Options List
Option | Description |
---|---|
canonicalize_javascript_libraries |
Identifies popular JavaScript libraries and replaces them with ones hosted for free by a JavaScript library hosting service (Google Hosted Libraries by default), which has several benefits, including:
|
combine_css |
Seeks to reduce the number of HTTP requests made by a browser during page refresh by replacing multiple distinct CSS files with a single CSS file, containing the contents of all of them. Particularly important in old browsers that were limited to two connections per domain. In addition to reduced overhead for HTTP headers and communications warm-up, this approach works better with TCP/IP slow-start, increasing the effective payload bit-rate through the browser’s network connection. |
convert_meta_tags |
Adds a response header that matches each meta tag with an http-equiv attribute.For example, the HTML <meta http-eqiv=”Content-Type” content=”text/html; charset=UTF-8″> Adds this HTTP header in the response: Content-Type: text/html; charset=UTF-8 The original tag is left unchanged. Certain http-equiv meta tags, specifically those that specify content-type, require a browser to reparse the HTML document if they do not match the headers. This avoids reparsing delays by ensuring that the headers match the meta tags. |
extend_cache |
Seeks to improve the cacheability of a web page’s resources without compromising the ability of site owners to change the resources and have those changes propagate to users’ browsers. The extend_cache filter rewrites the URL references in the HTML page to include a hash of the resource content (if rewrite_css is enabled, then image URLs in CSS are also rewritten). Thus if the site owners change the resource content, then the URL for the rewritten resource changes also. Since the old content in the user’s browser cache does not match the new name, the browser does not reference it again. |
flatten_css_imports |
Parses linked and inlined CSS and flattens it by replacing all @import rules with the contents of the imported file, repeating the process recursively for each imported file.Works on CSS found in <style> blocks and <link> references. |
inline_css |
Reduces the number of requests made by a web page by inserting the contents of small external CSS resources directly into the HTML document. Reduces the time it takes to display content to the user, especially in older browsers. |
inline_import_to_link |
Converts a <style> tag consisting of only @import statements into the corresponding <link> tags.This conversion does not itself result in any significant optimization; rather, its value lies in that it enables optimization of the linked-to CSS files by later filters, in particular the combine_css, rewrite_css, inline_css, and extend_cache filters. |
inline_javascript |
Reduces the number of requests made by a web page by inserting the contents of small external JavaScript resources directly into the HTML document.<br ?> Reduces the time it takes to display content to the user, especially in older browsers. |
insert_dns_prefetch |
Reduces DNS lookup time by providing hints to the browser at the beginning of the HTML, which allows the browser to pre-resolve DNS for resources on the page. DNS resolution time varies from <1ms for locally cached results to hundreds of milliseconds due to the cascading nature of DNS. This can contribute significantly towards total page load time. |
rewrite_css and fallback_rewrite_css_urls |
Parses linked and inline CSS, rewrites the images found and minifies the CSS. Wroks on CSS found in <style> blocks and <link> refs.Many images are referenced from CSS rather than HTML. If rewrite_images , recompress_images , recompress_jpeg , recompress_png , recompress_webp , convert_gif_to_png , convert_jpeg_to_webp , convert_png_to_jpeg , or extend_cache are enabled this filter finds and rewrites those images, saving bytes and extending cache lifetimes.The CSS parser cannot parse some CSS3 or proprietary CSS extensions. If fallback_rewrite_css_urls is not enabled, these CSS files are not rewritten at all. If the fallback_rewrite_css_urls filter is enabled, a fallback method attempts to rewrite the URLs in the CSS file, even if the CSS cannot be successfully parsed and minified.Minification can drastically reduce the byte count in standard CSS by stripping all comments and most whitespace and shortening color names. Use this filter to avoid the extra step of minifying CSS by hand when constructing and maintaining a site. This practice reduces the payload size. |
rewrite_javascript |
Minifies JavaScript code, using an algorithm similar to that in Douglas Crockford’s popular JSMin program. At present, the filter strips all comments and most whitespace and works only on JavaScript found in <script> blocks (either as the target of the src attribute or within the body of the block).Minification can drastically reduce the byte count in common JavaScript code. Use this filter to avoid the extra step of minifying JavaScript code by hand when constructing and maintaining a site. This practice reduces the payload size. |
rewrite_style_attributes_with_url |
Rewrites CSS inside elements’ style attribute. Requires rewrite_css to also be enabled. See the settings for rewrite_css to control CSS minification, image rewriting, image recompression, and cache extension. The rewrite_style_attributes filter enables the filter for all style attributes, whereas rewrite_style_attributes_with_url enables it only for style attributes that contain the text url() , for which you generally want to enable one or more image optimization filters.rewrite_style_attributes_with_url is more efficient because it does not always parse the CSS, but it does not optimize CSS that doesn’t reference any URLs. rewrite_style_attributes always parses the CSS and optimize everything possible. Since images are generally the source for most significant improvement and url() encloses them, rewrite_style_attributes_with_url is a good balance for most uses, while rewrite_style_attributes is available for more aggressive optimization. |
The two options below specify groups of image optimizations that help to make sure images are high quality and load fast. Please refer to the Pagespeed site for details.
Option | Description |
---|---|
rewrite_images |
This is a filter group that includes inline_images , recompress_images , convert_to_webp_lossless , and resize_images . |
recompress_images |
This is a filter group consisting of convert_gif_to_png , convert_jpeg_to_progressive , convert_jpeg_to_webp , convert_png_to_jpeg , jpeg_subsampling, recompress_jpeg , recompress_png , recompress_webp , strip_image_color_profile , and strip_image_meta_data . |
Further Reading
Have questions not answered here? Please Contact Support to get more help.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.
Last modified April 1, 2020