You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
Setup:
- Set jpeg recompression quality to
default to 10.
- Set jpeg recompression quality to 50
for an images directory.
- Set jpeg recompression quality to 100
for an html directory.
- Reference a jpeg in that images
directory from an html file in that
html directory.
When you load the html file it will rewrite the jpeg with the options from the
html directory, quality 100. If the image falls out of cache or, in a
multi-server environment, is requested from different server, it will be
regenerated using the specified default quality 10.
If there were another html directory with jpeg-quality set to 75, for example,
this would be even messier.
At no point will the recompression quality of 50 be used.
The problem is that there are several options that affect filter application
without changing the url, so mod_pagespeed can't always generate the resource
correctly from just the url. Making the url contain all of this information
would be possible, but it would also mean that any time we added a filter than
could be adjusted on a per-directory basis we would need to expand the urls and
that they might become too long.
Because this is not a common configuration for mod_pagespeed and even then this
bug would rarely surface in a single-server setup, it may not be very serious.
But if you're using mod_pagespeed for multiple sites and you want to have
different filter-options for different ones this might be a real problem.
One fix would be, as described above, expanding the urls to contain all
information necessary to generate a resource. Another would be to modify the
resource flow to support custom options, in which case this bug would stop
being a problem for a setup where mod_pagespeed is used for multiple sites with
different filter-options.
(Warning: none of this has been experimentally tested; it's all based on
reading the code for handle_as_resource which does not support custom options
(unlike InstawebContext::InstawebContext(), which does.).)
Original issue reported on code.google.com by jefftk@google.com on 3 Jul 2012 at 8:33
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
jefftk@google.com
on 3 Jul 2012 at 8:33The text was updated successfully, but these errors were encountered: