Tons of CSS parsing error

916 views
Skip to first unread message

Augusto Verzetti

unread,
Oct 18, 2016, 7:28:50 AM10/18/16
to mod-pagespeed-discuss
Hi,
first of all sorry for my bad english!

In my log file file I see:

[Tue Oct 18 11:07:46.944648 2016] [pagespeed:warn] [pid 10072] [mod_pagespeed 1.11.33.2-0 @10072] CSS parsing error in http://mysite.ext/immagini-video-tag/vitigni-autoctoni/
[Tue Oct 18 11:07:49.862724 2016] [pagespeed:warn] [pid 9269] [mod_pagespeed 1.11.33.2-0 @9269] CSS parsing error in http://mysite.ext/immagini-video/cooking-show-cristiano-bonolo-maddalena-baldini/
[Tue Oct 18 11:07:52.797583 2016] [pagespeed:warn] [pid 10289] [mod_pagespeed 1.11.33.2-0 @10289] CSS parsing error in http://mysite.ext/immagini-video/cooking-show-cristiano-bonolo-maddalena-baldini/
[Tue Oct 18 11:09:19.272565 2016] [pagespeed:warn] [pid 10640] [mod_pagespeed 1.11.33.2-0 @10640] CSS parsing error in http://mysite.ext/2016/10/ricette/minni-virgini-seni-vergini-dolce-tipico/
[Tue Oct 18 11:09:32.549997 2016] [pagespeed:warn] [pid 10458] [mod_pagespeed 1.11.33.2-0 @10458] CSS parsing error in http://mysite.ext/immagini-video-tag/lardo/
[Tue Oct 18 11:10:14.102530 2016] [pagespeed:warn] [pid 10856] [mod_pagespeed 1.11.33.2-0 @10856] CSS parsing error in http://mysite.ext/immagini-video/cooking-show-cristiano-bonolo-maddalena-baldini/
[Tue Oct 18 11:10:31.836950 2016] [pagespeed:warn] [pid 10849] [mod_pagespeed 1.11.33.2-0 @10849] CSS parsing error in http://mysite.ext/immagini-video/verdiana-gordini-le-mariette/
[Tue Oct 18 11:11:30.103451 2016] [pagespeed:warn] [pid 10856] [mod_pagespeed 1.11.33.2-0 @10856] CSS parsing error in http://mysite.ext/2016/10/moda/kurshuni-hows-the-weather-today/

It is a wordpress site, so with many css file.
So to understand what css file does not work with pagespeed I started to remove the css one by one.
I ddi not remove the css file but of course the code into html.

The result is a page with no reference to css!
You can verify this page here: https://developers.google.com/speed/pagespeed/insights/?hl=it&url=linvitatospeciale.com%2Fprova.html

But no way, the log always tells me: CSS parsing error in "that page".
Any suggest?

Thank you!!

Augusto


Otto van der Schaaf

unread,
Oct 18, 2016, 6:29:44 PM10/18/16
to mod-pagespeed-discuss
Turning on the debug filter may help you locate the offending css better, because html comments will be written close to the source (right after) of the offending css. For example, there is a style tag in the html of the page you posted with id="x-generated-css", which seems to have a problem. 
To turn on the debug filter, you can add ?PageSpeedFilters=+debug to the querystring, or you can enable it in configuration like any other filter:

ModPagespeedEnableFilters debug

Hope this helps!

Otto

ps - you can still rewrite urls in css that fails to parse correctly: https://developers.google.com/speed/pagespeed/module/filter-css-rewrite


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/bffc12b6-e7f0-4bd8-bc41-8ac5d0cbd556%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Augusto Verzetti

unread,
Oct 21, 2016, 9:10:10 PM10/21/16
to mod-pagespeed-discuss
Dear Otto sorry for the delay, I was away!
And of course also thank you for your help!
 

 With the "?PageSpeedFilters=+debug"  I can see the:


<!--deadline_exceeded for filter CssFilter-->


warning, but I don't know what does it mean...

About the https://developers.google.com/speed/pagespeed/module/filter-css-rewrite in my pagespeed.conf I already have inside these 2 lines:


   ModPagespeedEnableFilters rewrite_css
   ModPagespeedEnableFilters fallback_rewrite_css_urls

so I don't know what to do, thank you!


Augusto


Longinos

unread,
Oct 24, 2016, 4:20:10 AM10/24/16
to mod-pagespeed-discuss
Hi Augusto

I tried to do http://linvitatospeciale.com/?PageSpeedFilters=+debug , and I see that pagespeed is working well.
Images, css and js are rewrited, some are combined or inlined, some not because are big than 2048 bytes (perhaps need to set these parameters
ModPagespeedCssInlineMaxBytes bytes
ModPagespeedJsInlineMaxBytes bytes
ModPagespeedMaxCombinedJsBytes MaxBytes
ModPagespeedMaxCombinedCssBytes MaxBytes
ModPagespeedCssImageInlineMaxBytes MaxBytes
ModPagespeedImageInlineMaxBytes MaxBytes)

I suggest you to use
ModPagespeedEnableFilters inline_google_font_css and ModPagespeedDomain http://fonts.googleapis.com/ to inline google fonts css.

I only see 1 url that is not cacheable, and pagespeed need that the resources be cacheable to work (http://linvitatospeciale.com/?ai1ec_render_js=common_frontend&amp;is_backend=false&amp;ver=2.5.10)

If you get the message
<!--deadline_exceeded for filter CssFilter-->, the resource are not rewriten because need more time than the default to be parsed and rewrited, try to view the source code of http://linvitatospeciale.com/?PageSpeedFilters=+debug after some more hits

Hope this helps

Longinos

unread,
Oct 24, 2016, 4:33:37 AM10/24/16
to mod-pagespeed-discuss
Hi again

I have forgotten that perhaps you can use ModPagespeedEnableFilters elide_attributes , ModPagespeedEnableFilters collapse_whitespace , ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters remove_quotes and ModPagespeedEnableFilters trim_urls to minimize the html code


El martes, 18 de octubre de 2016, 13:28:50 (UTC+2), Augusto Verzetti escribió:

Augusto Verzetti

unread,
Oct 25, 2016, 8:13:43 AM10/25/16
to mod-pagespeed-discuss


Many thanks Longinos!!!

I will try every thing your suggest and let you know the results... fingers crossed :)

Augusto
Message has been deleted

Augusto Verzetti

unread,
Nov 1, 2016, 11:27:05 AM11/1/16
to mod-pagespeed-discuss

Hi Longinos, I have found the error:

@media ( max-width: 967px) {
 .x-sidebar.right {
 display: none;
 }

and now I don't have anymore "tons of css"!

Well just one more thing.
I have a 200k .js file, and pagespeed does not optimize it, where I am wrong?

My actual configurartion:

# Other defaults (cache sizes and thresholds):
    #
    # ModPagespeedFileCacheSizeKb          102400
    # ModPagespeedFileCacheCleanIntervalMs 3600000
    ModPagespeedLRUCacheKbPerProcess     1024
    ModPagespeedLRUCacheByteLimit        16384
    # ModPagespeedCssFlattenMaxBytes       102400
    ModPagespeedCssInlineMaxBytes        20480
    ModPagespeedCssImageInlineMaxBytes   0
    ModPagespeedImageInlineMaxBytes      3072
    ModPagespeedJsInlineMaxBytes         8192
    # ModPagespeedCssOutlineMinBytes       3000
    # ModPagespeedJsOutlineMinBytes        3000
    ModPagespeedMaxCombinedCssBytes      -1
    # ModPagespeedMaxCombinedJsBytes      92160

   ModPagespeedEnableFilters rewrite_css
   ModPagespeedEnableFilters fallback_rewrite_css_urls
   ModPagespeedEnableFilters inline_google_font_css
   ModPagespeedDomain http://fonts.googleapis.com/
   ModPagespeedEnableFilters elide_attributes
   ModPagespeedEnableFilters collapse_whitespace
   ModPagespeedEnableFilters remove_comments
   ModPagespeedEnableFilters remove_quotes
   ModPagespeedEnableFilters trim_urls

Thank you!

Augusto

Longinos

unread,
Nov 2, 2016, 4:55:40 AM11/2/16
to mod-pagespeed-discuss
Hi Augusto
Perhaps is this http://linvitatospeciale.com/?ai1ec_render_js=common_frontend&is_backend=false&ver=2.5.10 ?
These js have a header

  1. Cache-Control:
    max-age=0, private

Pagespeed need resources are public cacheable to be rewriten and this resource don´t

I can see that some resources have sort lifetime in their Cache-control  (less than 5 min) try to increase the cache life time.


Try to add these filters  too:


ModPagespeedEnableFilters prioritize_critical_css

ModPagespeedGoogleFontCssInlineMaxBytes bytes (10000 perhaps?)

ModPagespeedEnableFilters defer_javascript

ModPagespeedSupportNoScriptEnabled false (your site need js to render, thus not redirect disabling js is needed)

ModPagespeedEnableFilters move_css_above_scripts

ModPagespeedEnableFilters move_css_to_head

and whith care (can break your site)

ModPagespeedAvoidRenamingIntrospectiveJavascript off

Play with these filters and see the results, you can disable at any momment.

El martes, 18 de octubre de 2016, 13:28:50 (UTC+2), Augusto Verzetti escribió:

Ankit Baid

unread,
May 30, 2018, 2:51:03 PM5/30/18
to mod-pagespeed-discuss
I have similar problem but i did not understand the error

Longinos

unread,
May 30, 2018, 4:05:04 PM5/30/18
to mod-pagespeed-discuss
Hi

What problem? css parsing error or js file not rewrited?

Reply all
Reply to author
Forward
0 new messages