crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

Images referenced by CSS do not adhere to extend_cache #667

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have tried this on both the latest beta version and the latest release 
version of Mod_Pagespeed

Basically, if I run PageSpeed Insights on www.sellmyretro.com I get warnings 
about leveraging browser caching.  The images listed are ones referenced by the 
CSS.

I have the extend_cache filter enabled, so it appears as though this only 
applies to the images referenced by CSS (ie. background images)

Original issue reported on code.google.com by rwap.services on 7 Apr 2013 at 7:55

GoogleCodeExporter commented 9 years ago
Ah - my mistake - I need to add the filter fallback_rewrite_css_urls as my CSS 
contains some elements which are CSS3.

That brings me to a question I guess, if combine_css is enabled, but one of 3 
CSS files cannot be parsed - does (or should) modpagespeed rewrite and then 
combine the 2 CSS files which can be parsed, and leave the third?

Original comment by rwap.services on 7 Apr 2013 at 8:05

GoogleCodeExporter commented 9 years ago
I have identified the issue here:

With

    ModPagespeedRewriteLevel CoreFilters

Set, also having the line:
    ModPagespeedEnableFilters fallback_rewrite_css_urls

in the configuration file (from an earlier version of modpagespeed), actually 
manages to disable that filter as it is now present in the CoreFilter set(!)

Original comment by rwap.services on 8 Apr 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Really? If so that is completely broken. IIRC we have made some tweaks in that 
area so this is possible but I'll investigate. Thanks for the report, sorry for 
the issue! :)

Original comment by matterb...@google.com on 8 Apr 2013 at 12:41

GoogleCodeExporter commented 9 years ago
Hmm - I have been looking more closely at my pagespeed.conf - for some reason I 
also had a     

ModPagespeedDisableFilters rewrite_images

directive in there - having removed this, the fallback_rewrite_css_urls filter 
works whether or not I include it expressly (this is on the release version of 
modpagespeed).

Oddly I never even thought to look for this, as the images were all being 
re-written anyway!

Original comment by rwap.services on 8 Apr 2013 at 12:56