Some filters not working

9 views
Skip to first unread message

just...@biworld.lt

unread,
Apr 23, 2011, 4:16:36 PM4/23/11
to mod-pagespeed-discuss
Hi, I have almost all filters enabled and not happy with the results.
So I checked like this:
http://biworld.lt/?ModPagespeed=on&ModPagespeedFilters=rewrite_css,rewrite_images

But still no css rewritten, no images rewritten...

Joshua Marantz

unread,
Apr 23, 2011, 5:39:14 PM4/23/11
to mod-pagesp...@googlegroups.com
I took a quick look; I might take a deeper look on monday.  extend_cache works:


This causes lots of javascript, images, and css to be cache-extended.  So your mod_pagespeed installation is looking properly configured.

Probably, CSS is not being minified because our parser can't parse it, and has decided not to touch it rather than potentially breaking it.  Our 'rewrite_css' filter is not on by default yet because this is a bit of a work in progress, and in particular, the CSS3 is not really an established standard yet.  We can check more deeply on monday.

There are a few images that are being cache-extended but not otherwise rewriten.  This may be because at our current settings that balance quality, compression, and cpu-time, we've decided we can't improve your image.  Again we can look more deeply on monday.

Thanks for the report,
-Josh

Joshua Marantz

unread,
May 3, 2011, 7:55:06 PM5/3/11
to mod-pagesp...@googlegroups.com
Following up -- I took a look in the debugger.  We are rejecting the CSS file:


Because of this construct: 

@media all and (orientation:portrait) { 
  /* Style adjustments for portrait mode goes here */
  
}

Our parser issued this message (though it doesn't reach a log that you can see):

  "Unsupported value starting with ("

I'm going to let sligocki follow up with commentary on whether this is correct CSS or not.  But in any case it looks like that stanza in your CSS file could be commented out until you have something to put in there.   That would let mod_pagespeed rewrite it -- minifying it and, potentially, rewriting or cache-extending images referenced from it.

And of course if you enable 'extend_cache' then we will cache extend it even if we can't parse it.

-Josh

just...@biworld.lt

unread,
May 4, 2011, 7:07:15 AM5/4/11
to mod-pagespeed-discuss
Thank you for investigating this. I have commented this out, but still
these filters is not working or I do not understand how they should
work.

On May 4, 2:55 am, Joshua Marantz <jmara...@google.com> wrote:
> Following up -- I took a look in the debugger.  We are rejecting the CSS
> file:
>
> http://biworld.lt/css/style.css?v=2
>
> <http://biworld.lt/css/style.css?v=2>Because of this construct:
>
> @media all and (orientation:portrait) {
>   /* Style adjustments for portrait mode goes here */
>
> }
>
> Our parser issued this message (though it doesn't reach a log that you can
> see):
>
>   "Unsupported value starting with ("
>
> I'm going to let sligocki follow up with commentary on whether this is
> correct CSS or not.  But in any case it looks like that stanza in your CSS
> file could be commented out until you have something to put in there.   That
> would let mod_pagespeed rewrite it -- minifying it and, potentially,
> rewriting or cache-extending images referenced from it.
>
> And of course if you enable 'extend_cache' then we will cache extend it even
> if we can't parse it.
>
> -Josh
>
>
>
>
>
>
>
> On Sat, Apr 23, 2011 at 5:39 PM, Joshua Marantz <jmara...@google.com> wrote:
> > I took a quick look; I might take a deeper look on monday.  extend_cache
> > works:
>
> >http://biworld.lt/?ModPagespeed=on&ModPagespeedFilters=rewrite_css,re...
>
> > This causes lots of javascript, images, and css to be cache-extended.  So
> > your mod_pagespeed installation is looking properly configured.
>
> > Probably, CSS is not being minified because our parser can't parse it, and
> > has decided not to touch it rather than potentially breaking it.  Our
> > 'rewrite_css' filter is not on by default yet because this is a bit of a
> > work in progress, and in particular, the CSS3 is not really an established
> > standard yet.  We can check more deeply on monday.
>
> > There are a few images that are being cache-extended but not otherwise
> > rewriten.  This may be because at our current settings that balance quality,
> > compression, and cpu-time, we've decided we can't improve your image.  Again
> > we can look more deeply on monday.
>
> > Thanks for the report,
> > -Josh
>
> > On Sat, Apr 23, 2011 at 4:16 PM, justi...@biworld.lt <justi...@biworld.lt>wrote:
>
> >> Hi, I have almost all filters enabled and not happy with the results.
> >> So I checked like this:
>
> >>http://biworld.lt/?ModPagespeed=on&ModPagespeedFilters=rewrite_css,re...

Joshua Marantz

unread,
May 4, 2011, 7:43:29 AM5/4/11
to mod-pagesp...@googlegroups.com
Hi,

While this is not an exact match for our CSS parser, there is a convenient CSS validation service at http://jigsaw.w3.org/css-validator/ .  Under "More Options" you can select "CSS level 3", although I'd like to point out that CSS 3 is a draft standard and mod_pagespeed doesn't support 100% of the constructs yet.

Take a look at the comments made on that site when you paste in http://biworld.lt/css/style.css?v=2

In particular I noticed "parse error" at line 715 and 718.  I think mod_pagespeed will not have trouble with the undefined properties (e.g. -moz-border-radius).

-Josh
Reply all
Reply to author
Forward
0 new messages