Skip to content

Commit

Permalink
Content Transformation: Update link to RFC, add mentions of Lite Mode (
Browse files Browse the repository at this point in the history
…#191)

* Update link to RFC, add mentions of Lite Mode

Changes motivated by #185

* Refactor desc., highlight caution for disabling

I added that we're using `cache-control: no-transform` in the introductory paragraph because that is what we link to below that paragraph. Can remove if redundant, but added for clarity.

Also, IMO we should still separate the warnings "(!)" about considering the impact of disabling content transformations and "If you are using `mod_pagespeed`" because the majority of developers probably aren't using `mod_pagespeed` and so if you aren't using it, it's simple to distinguish.
  • Loading branch information
Malvoz authored and LeoColomb committed Jun 5, 2019
1 parent 7470165 commit 5dc823c
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions src/web_performance/content_transformation.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@
# | Content transformation |
# ----------------------------------------------------------------------

# Prevent intermediate caches or proxies (e.g.: such as the ones
# used by mobile network providers) from modifying the website's
# content.
# Prevent intermediate caches or proxies (such as those used by mobile
# network providers) and browsers data-saving features from modifying
# the website's content using the `cache-control: no-transform` directive.
#
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
# https://tools.ietf.org/html/rfc2616#section-14.9.5
# https://tools.ietf.org/html/rfc7234#section-5.2.2.4
#
# (!) If you are using `mod_pagespeed`, please note that setting
# the `Cache-Control: no-transform` response header will prevent
# `PageSpeed` from rewriting `HTML` files, and, if the
# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set
# to `off`, also from rewriting other resources.
# (!) Carefully consider the impact on your visitors before disabling
# content transformation. These transformations are performed to
# improve the experience for data- and cost-constrained users
# (e.g. users on a 2G connection).
#
# https://developers.google.com/speed/pagespeed/module/configuration#notransform
# You can test the effects of content transformation applied by
# Google's Lite Mode by visiting: https://googleweblight.com/i?u=https://www.example.com
#
# https://support.google.com/webmasters/answer/6211428
#
# (!) If you are using `mod_pagespeed`, note that disabling this will
# prevent `PageSpeed` from rewriting HTML files, and, if the
# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set to
# `off`, also from rewriting other resources.
#
# https://developers.google.com/speed/pagespeed/module/configuration#notransform

<IfModule mod_headers.c>
Header merge Cache-Control "no-transform"
Expand Down

0 comments on commit 5dc823c

Please sign in to comment.