definite list of CoreFilters

86 views
Skip to first unread message

Ovidiu Pacuraru

unread,
Mar 23, 2014, 3:03:57 PM3/23/14
to ngx-pagesp...@googlegroups.com
Take this page of the documentation: https://developers.google.com/speed/pagespeed/module/config_filters#level 

It says:

The core set of filters contains:

   add_head
   combine_css
   combine_javascript
   convert_meta_tags
   extend_cache
   fallback_rewrite_css_urls
   flatten_css_imports
   inline_css
   inline_import_to_link
   inline_javascript
   rewrite_css
   rewrite_images
   rewrite_javascript
   rewrite_style_attributes_with_url
But then if you scroll down, it says:

combine_javascriptNoCombines multiple script elements into one.
The NO indicating it is not in the core set.

Which statement is true? 

Ovidiu Pacuraru

unread,
Mar 23, 2014, 3:05:27 PM3/23/14
to ngx-pagesp...@googlegroups.com
Btw. when going to mydomain.com/ngx_pagespeed_statistics?config it says:

Configuration:
Version: 13: on

Filters
ah	Add Head
cc	Combine Css
jc	Combine Javascript

AND

Options
  l	Core Filters

Joshua Marantz

unread,
Mar 23, 2014, 3:37:13 PM3/23/14
to ngx-pagesp...@googlegroups.com
Thanks for letting us know.  combine_javascript is in the core set as of version 1.7 (I think) and we'll update the table.

-Josh


--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at http://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Ovidiu Pacuraru

unread,
Mar 24, 2014, 4:52:03 AM3/24/14
to ngx-pagesp...@googlegroups.com
Cool, thanks. Better check the whole table, I just pointed out one example.

And a follow-up: seeing that on this test-site I activated the CoreFilters, I expected .css and .js files to get combined but .css seems not to become combined. Since with the version of ngx_pagespeed I run, mydomain.com/ngx_pagespeed_message returns: Writing to ngx_pagespeed_message failed. Please check if it's enabled in pagespeed.conf. 

I have no clue why its not properly combining. I've just set the config to world-readable, you can check it here: http://ict-consult.co.za/ngx_pagespeed_statistics?config 

Jeff Kaufman

unread,
Mar 24, 2014, 9:53:22 AM3/24/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
On Mon, Mar 24, 2014 at 4:52 AM, Ovidiu Pacuraru <ovi...@pacura.ru> wrote:
> Writing to ngx_pagespeed_message failed. Please check if it's enabled
> in pagespeed.conf.
>

If you'd like to be able to view messages you need to give it a message buffer:

pagespeed MessageBufferSize 100000;

> I have no clue why its not properly combining. I've just set the config to
> world-readable, you can check it here:
> http://ict-consult.co.za/ngx_pagespeed_statistics?config
>
> The test site: http://www.ict-consult.co.za/
>

I just poked at your site some, and I'm not sure why css isn't
combining. It's able to fetch and rewrite your resources, but we
should see, for example, slickmap.css and woocommerce-layout.css being
combined and we're not. Shawn?

<link rel='stylesheet' id='slickmap.css-css'
href='http://www.ict-consult.co.za/wp-content/plugins/slick-sitemap//A.slickmap.css,qver=3.8.1.pagespeed.cf.V-0wX-XYtN.css'
type='text/css' media='all'/>

<link rel='stylesheet' id='woocommerce-layout-css'
href='http://www.ict-consult.co.za/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css,qver=2.1.5.pagespeed.ce.1-Poq0Tg9e.css'
type='text/css' media='all'/>

Maksim Orlovich

unread,
Mar 24, 2014, 11:07:00 AM3/24/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
We won't combine links with an ID attribute. I am confused as to why
+debug doesn't seem to report that, though.

Jan-Willem Maessen

unread,
Mar 24, 2014, 11:48:55 AM3/24/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
On Mon, Mar 24, 2014 at 11:07 AM, Maksim Orlovich <morl...@google.com> wrote:
We won't combine links with an ID attribute. I am confused as to why
+debug doesn't seem to report that, though.

Right.  Also the .ce. on the second resource suggests it's not parsing correctly (or it'd get a .cf. filter marker instead).  That would likely show up in debug mode if you removed the id= from each link, but as Maks notes the ids are the first thing preventing these files from being combined.

-Jan

Ovidiu Pacuraru

unread,
Mar 24, 2014, 5:31:17 PM3/24/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
I have that directive set and its still not working.

Ovidiu Pacuraru

unread,
Mar 24, 2014, 5:39:56 PM3/24/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
Well, I guess there's not much I can do about that, this is a theme I bought...
Any particular reason for not combining links with IDs?
Can't comment on why this is not showing in debug mode.
> To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.

> Visit this group at http://groups.google.com/group/ngx-pagespeed-discuss.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.

Jeff Kaufman

unread,
Mar 25, 2014, 2:19:38 PM3/25/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
On Mon, Mar 24, 2014 at 5:39 PM, Ovidiu Pacuraru <ovi...@pacura.ru> wrote:
> Any particular reason for not combining links with IDs?

The logic is that if someone has put an id on an element it's because
they intend to reference it with css or js, and so we should leave it
alone. This means no inlining or combining.

Joshua Marantz

unread,
Mar 25, 2014, 3:26:37 PM3/25/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
FWIW I believe we *do* inline JavaScript and Images with IDs.  But in that case we can leave the id on the inline script/img tags.  But in the case of CSS the tag-type changes when we inline from 'link' to 'style', so we don't inline in that case.

-Josh



--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.

Ovidiu Pacuraru

unread,
Mar 25, 2014, 5:49:07 PM3/25/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
@Jeff + Josh

Awesome explanations, thanks for taking the time to explain. I had to read them twice but I do understand now. Maybe I should look at testing ngx_apgespeed with another more "normal" theme... 
I'll also ask the theme author about the reasons for giving out these IDs, maybe there's no particular reason for it...

Ovidiu Pacuraru

unread,
Mar 27, 2014, 5:30:37 PM3/27/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
Apparently Wordpress automatically adds IDs to styles and scripts when they are being included via 

How about a parameter for ngx_pagespeed to go ahead and fully process styles with IDs?

Ovidiu Pacuraru

unread,
Apr 11, 2014, 4:15:24 PM4/11/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
Any feedback or ideas? Wordpress is quite well-used so I guess I'm not the only one using ngx_pagespeed with WP?

Jeff Kaufman

unread,
Apr 11, 2014, 5:12:34 PM4/11/14
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
We can add an option to combine css files even if they have IDs, or we
can try and get wordpress to stop putting in IDs if they're not going
to be used, but neither of those are going to help you for a while
yet.

It makes me sad to need to suggest supplementing with another
optimization tool, but some looking suggests you could use
https://wordpress.org/plugins/combine-css/



On Fri, Apr 11, 2014 at 4:15 PM, Ovidiu Pacuraru <ovi...@pacura.ru> wrote:
> Any feedback or ideas? Wordpress is quite well-used so I guess I'm not the
> only one using ngx_pagespeed with WP?
>

Ovidiu Pacuraru

unread,
Oct 6, 2015, 10:40:17 AM10/6/15
to ngx-pagespeed-discuss, slig...@google.com
Sorry to revive this old thread but I chatted to a developer and he gave me some functions to completely remove the IDs created by WP. I've only tested it on one website so far but it seems nothing broke (yet). If you'd like, have a look, there should be no IDs at all: http://www.israelsafety.com/ also accessible: http://www.israelsafety.com/pagespeed_admin 

I know this is not an ideal solution but I wanted to see if it would give me a better rating/speed and I must say it doesn't seem to change much. 

here is the code, use at your own risk inside functions.php!
add_filter( 'style_loader_tag', 'my_style_loader_tag', 10, 2 );

function my_style_loader_tag( $tag, $handle ) {

return str_replace( " id='{$handle}-css'", '', $tag );
}

Jeff Kaufman

unread,
Oct 7, 2015, 4:27:16 PM10/7/15
to ngx-pagesp...@googlegroups.com, Shawn Ligocki
Cool! I do still see one style with an id, though:

<style id='rs-plugin-settings-inline-css' type='text/css'>.tp-caption ...
Reply all
Reply to author
Forward
0 new messages