Created
September 9, 2014 03:03
-
-
Save mauryaratan/3eae9ea5322c9d1b47d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pagespeed on; | |
# Needs to exist and be writable by nginx. Use tmpfs for best performance. | |
pagespeed FileCachePath /var/ngx_pagespeed_cache; | |
# Ensure requests for pagespeed optimized resources go to the pagespeed handler | |
# and no extraneous headers get set. | |
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { | |
add_header "" ""; | |
} | |
location ~ "^/pagespeed_static/" { } | |
location ~ "^/ngx_pagespeed_beacon$" { } | |
# Respecting Vary Headers | |
pagespeed RespectVary on; | |
# Honoring no-transform Cache-Control Headers | |
pagespeed DisableRewriteOnNoTransform off; | |
# Lower-casing HTML element and attribute names | |
pagespeed LowercaseHtmlNames on; | |
# Preserving HTML caching headers | |
pagespeed ModifyCachingHeaders off; | |
pagespeed EnableFilters combine_css,rewrite_css,rewrite_style_attributes,prioritize_critical_css,move_css_to_head,move_css_above_scripts; | |
pagespeed EnableFilters lazyload_images,inline_preview_images,convert_to_webp_lossless,resize_images,resize_mobile_images; | |
pagespeed EnableFilters collapse_whitespace,remove_quotes,insert_dns_prefetch; | |
pagespeed EnableFilters local_storage_cache; | |
# Preserve URL Relativity | |
pagespeed PreserveUrlRelativity on; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment