---
title: "PageSpeed support"
date: "2015-04-27"
category: "web-content"
slug: "pagespeed-support"
---

## Overview

PageSpeed ([mod\_pagespeed](https://developers.google.com/speed/pagespeed/module)) optimizes your site for faster load times. It applies a variety of filters including script minification, CSS inlining, and automatic JavaScript deferral to prevent DOM render blocking. The result is reduced latency and improved visitor engagement.

## Availability

PageSpeed is available on all [[determining-platform-version]] and is enabled by default.

## Managing Filters

PageSpeed uses a modular filter system. Filters can be added or removed via a [[htaccess-guide]] to customize optimizations for your site. By default, all filters listed in `CoreFilters` (see the filter list below) are enabled.

### Adding or Removing Filters

1. Create a `.htaccess` file in your [[where-is-site-content-served-from]] if one does not already exist.
2. Use the following directives:
   - **To add filters:** `ModPagespeedEnableFilters filtera,filterb`
   - **To remove filters:** `ModPagespeedDisableFilters filtera,filterb`

Changes take effect immediately and modify the active `CoreFilters` set.

## Filter Reference

In the table below, **CF** = CoreFilters (enabled by default) and **OFB** = OptimizeForBandwidth.

| Filter | CF | OFB | Description |
|--------|:--:|:---:|-------------|
| [`add_head`](https://developers.google.com/speed/pagespeed/module/filter-head-add) | Yes | No | Adds a `<head>` element if not already present. |
| [`combine_heads`](https://developers.google.com/speed/pagespeed/module/filter-head-combine) | No | No | Combines multiple `<head>` elements into one. |
| [`inline_import_to_link`](https://developers.google.com/speed/pagespeed/module/filter-css-inline-import) | Yes | No | Converts `<style>` tags with only CSS `@imports` to equivalent `<link>` tags. |
| [`outline_css`](https://developers.google.com/speed/pagespeed/module/filter-css-outline) | No | No | Externalizes large CSS blocks into cacheable files. |
| [`outline_javascript`](https://developers.google.com/speed/pagespeed/module/filter-js-outline) | No | No | Externalizes large JS blocks into cacheable files. |
| [`move_css_above_scripts`](https://developers.google.com/speed/pagespeed/module/filter-css-above-scripts) | No | No | Moves CSS elements above `<script>` tags. |
| [`move_css_to_head`](https://developers.google.com/speed/pagespeed/module/filter-css-to-head) | No | No | Moves CSS elements into the `<head>`. |
| [`combine_css`](https://developers.google.com/speed/pagespeed/module/filter-css-combine) | Yes | No | Combines multiple CSS elements into one. |
| [`rewrite_css`](https://developers.google.com/speed/pagespeed/module/filter-css-rewrite) | Yes | Yes | Minifies CSS and optionally rewrites or cache-extends referenced images. In OFB mode, minification is in-place. |
| [`fallback_rewrite_css_urls`](https://developers.google.com/speed/pagespeed/module/filter-css-rewrite) | Yes | No | Rewrites resources in CSS files that cannot otherwise be parsed and minified. |
| [`rewrite_style_attributes`](https://developers.google.com/speed/pagespeed/module/filter-rewrite-style-attributes) | No | No | Applies CSS rewriting to inline `style` attributes. |
| [`rewrite_style_attributes_with_url`](https://developers.google.com/speed/pagespeed/module/filter-rewrite-style-attributes) | Yes | No | Applies CSS rewriting to `style` attributes containing `url(`. |
| [`flatten_css_imports`](https://developers.google.com/speed/pagespeed/module/filter-flatten-css-imports) | Yes | No | Inlines CSS by flattening all `@import` rules. |
| [`prioritize_critical_css`](https://developers.google.com/speed/pagespeed/module/filter-prioritize-critical-css) | No | No | Replaces CSS tags with inline versions containing only CSS used by the page. |
| [`make_google_analytics_async`](https://developers.google.com/speed/pagespeed/module/filter-make-google-analytics-async) | No | No | Converts synchronous Google Analytics API calls to asynchronous. |
| [`rewrite_javascript`](https://developers.google.com/speed/pagespeed/module/filter-js-minify) | Yes | Yes | Minifies JavaScript files. In OFB mode, minification is in-place. |
| [`rewrite_javascript_external`](https://developers.google.com/speed/pagespeed/module/filter-js-minify) | Yes | Yes | Implied by `rewrite_javascript`. Minifies external JavaScript files. |
| [`rewrite_javascript_inline`](https://developers.google.com/speed/pagespeed/module/filter-js-minify) | Yes | Yes | Implied by `rewrite_javascript`. Minifies inline JavaScript blocks. |
| [`include_js_source_maps`](https://developers.google.com/speed/pagespeed/module/filter-source-maps-include) | No | No | Adds source maps to rewritten JavaScript files. |
| [`combine_javascript`](https://developers.google.com/speed/pagespeed/module/filter-js-combine) | Yes | No | Combines multiple script elements into one. |
| [`canonicalize_javascript_libraries`](https://developers.google.com/speed/pagespeed/module/filter-canonicalize-js) | No | No | Redirects JavaScript libraries to a hosting service. |
| [`inline_css`](https://developers.google.com/speed/pagespeed/module/filter-css-inline) | Yes | No | Inlines small CSS files into the HTML document. |
| [`inline_google_font_css`](https://developers.google.com/speed/pagespeed/module/filter-css-inline-google-fonts) | No | No | Inlines small CSS files from fonts.googleapis.com. |
| [`inline_javascript`](https://developers.google.com/speed/pagespeed/module/filter-js-inline) | Yes | No | Inlines small JS files into the HTML document. |
| [`local_storage_cache`](https://developers.google.com/speed/pagespeed/module/filter-local-storage-cache) | No | No | Caches inlined resources in HTML5 local storage. |
| [`insert_ga`](https://developers.google.com/speed/pagespeed/module/filter-insert-ga) | No | No | Adds the Google Analytics snippet to each HTML page. |
| [`rewrite_images`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize) | Yes | Yes | Optimizes images by re-encoding, removing excess pixels, and inlining small images. |
| [`convert_jpeg_to_progressive`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#progressive) | Yes | Yes | Converts larger JPEGs to progressive format. Implied by `recompress_images`. |
| [`convert_png_to_jpeg`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#png_to_jpeg) | Yes | Yes | Converts GIF and PNG images to JPEG when appropriate. Implied by `recompress_images`. |
| [`convert_jpeg_to_webp`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#convert_jpeg_to_webp) | Yes | Yes | Produces lossy WebP instead of JPEG for supported browsers. Implied by `recompress_images`. |
| [`convert_to_webp_lossless`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#convert_to_webp_lossless) | No | No | Replaces GIF and PNG images with lossless WebP for supported browsers. |
| [`insert_image_dimensions`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#dimensions) | No | No | Adds `width` and `height` attributes to `<img>` tags that lack them. |
| [`inline_images`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#inline_images) | Yes | No | Implied by `rewrite_images`. Replaces small images with `data:` URLs. |
| [`recompress_images`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#recompress_images) | Yes | Yes | Implied by `rewrite_images`. Recompresses images and converts GIFs to PNGs. |
| [`recompress_jpeg`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#recompress_jpeg) | Yes | Yes | Implied by `recompress_images`. Recompresses JPEGs. |
| [`recompress_png`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#recompress_png) | Yes | Yes | Implied by `recompress_images`. Recompresses PNGs. |
| [`recompress_webp`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#recompress_webp) | Yes | Yes | Implied by `recompress_images`. Recompresses WebP images. |
| [`convert_gif_to_png`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#convert_gif_to_png) | Yes | Yes | Implied by `recompress_images`. Converts GIFs to PNGs. |
| [`strip_image_color_profile`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#strip_image_color_profile) | Yes | Yes | Implied by `recompress_images`. Strips color profile info from images. |
| [`strip_image_meta_data`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#strip_image_meta_data) | Yes | Yes | Implied by `recompress_images`. Strips EXIF metadata from images. |
| [`jpeg_sampling`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#jpeg_sampling) | Yes | Yes | Implied by `recompress_images`. Reduces JPEG color sampling to 4:2:0. |
| [`resize_images`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#resize_images) | Yes | No | Implied by `rewrite_images`. Resizes images when `<img>` specifies smaller dimensions. |
| [`resize_rendered_image_dimensions`](https://developers.google.com/speed/pagespeed/module/filter-image-optimize#resize_rendered_image_dimensions) | Yes | No | Implied by `rewrite_images`. Resizes images when rendered dimensions are smaller than the actual image. |
| [`inline_preview_images`](https://developers.google.com/speed/pagespeed/module/filter-inline-preview-images) | No | No | Uses inlined low-quality images as placeholders, replaced by originals after page load. |
| [`resize_mobile_images`](https://developers.google.com/speed/pagespeed/module/filter-inline-preview-images#resize_mobile_images) | No | No | Like `inline_preview_images` but uses smaller placeholders for mobile browsers. |
| [`remove_comments`](https://developers.google.com/speed/pagespeed/module/filter-comment-remove) | No | No | Removes HTML comments (not inline JS or CSS comments). |
| [`collapse_whitespace`](https://developers.google.com/speed/pagespeed/module/filter-whitespace-collapse) | No | No | Removes excess whitespace in HTML (excluding `<pre>`, `<script>`, `<style>`, `<textarea>`). |
| [`elide_attributes`](https://developers.google.com/speed/pagespeed/module/filter-attribute-elide) | No | No | Removes attributes not significant per the HTML spec. |
| [`extend_cache`](https://developers.google.com/speed/pagespeed/module/filter-cache-extend) | Yes | No | Extends cache lifetime of CSS, JS, and image resources by signing URLs with a content hash. |
| [`extend_cache_css`](https://developers.google.com/speed/pagespeed/module/filter-cache-extend) | Yes | No | Implied by `extend_cache`. Extends cache lifetime of CSS resources. |
| [`extend_cache_images`](https://developers.google.com/speed/pagespeed/module/filter-cache-extend) | Yes | No | Implied by `extend_cache`. Extends cache lifetime of images. |
| [`extend_cache_scripts`](https://developers.google.com/speed/pagespeed/module/filter-cache-extend) | Yes | No | Implied by `extend_cache`. Extends cache lifetime of scripts. |
| [`extend_cache_pdfs`](https://developers.google.com/speed/pagespeed/module/filter-cache-extend-pdfs) | No | No | Extends cache lifetime of PDFs by signing URLs with a content hash. |
| [`sprite_images`](https://developers.google.com/speed/pagespeed/module/filter-image-sprite) | No | No | Combines background images in CSS into a single sprite. |
| [`rewrite_domains`](https://developers.google.com/speed/pagespeed/module/filter-domain-rewrite) | No | No | Rewrites resource domains based on `MapRewriteDomain` and `ShardDomain` settings. |
| [`trim_urls`](https://developers.google.com/speed/pagespeed/module/filter-trim-urls) | No | No | Shortens URLs by making them relative to the base URL. |
| [`pedantic`](https://developers.google.com/speed/pagespeed/module/filter-pedantic) | No | No | Adds default `type` attributes for `<script>` and `<style>` tags on non-HTML5 pages. |
| [`remove_quotes`](https://developers.google.com/speed/pagespeed/module/filter-quote-remove) | No | No | Removes unnecessary quotes around HTML attributes. |
| [`add_instrumentation`](https://developers.google.com/speed/pagespeed/module/filter-instrumentation-add) | No | No | Adds JavaScript to measure page latency and report back to the server. |
| [`convert_meta_tags`](https://developers.google.com/speed/pagespeed/module/filter-convert-meta-tags) | Yes | No | Adds response headers for `<meta>` tags with `http-equiv` attributes. |
| [`defer_javascript`](https://developers.google.com/speed/pagespeed/module/filter-js-defer) | No | No | Defers JavaScript execution until page load is complete. |
| [`dedup_inlined_images`](https://developers.google.com/speed/pagespeed/module/filter-dedup-inlined-images) | No | No | Replaces repeated inlined images with JavaScript that loads from the first occurrence. |
| [`lazyload_images`](https://developers.google.com/speed/pagespeed/module/filter-lazyload-images) | No | No | Loads images when they become visible in the viewport. |
| [`insert_dns_prefetch`](https://developers.google.com/speed/pagespeed/module/filter-insert-dns-prefetch) | No | No | Inserts `<link rel="dns-prefetch">` tags to reduce DNS resolution time. |
| [`in_place_optimize_for_browser`](https://developers.google.com/speed/pagespeed/module/system#in_place_optimize_for_browser) | No | Yes | Performs browser-dependent [in-place resource optimizations](https://developers.google.com/speed/pagespeed/module/system#ipro). |

## See Also

- [PageSpeed: Configuring Filters](https://developers.google.com/speed/pagespeed/module/config_filters)
- [PageSpeed: Filters](https://developers.google.com/speed/pagespeed/module/filters)
