Your page has 1 blocking script resources and 12 blocking CSS resources.

45 views
Skip to first unread message

Kevin Nguyen

unread,
Aug 31, 2017, 7:40:06 AM8/31/17
to mod-pagespeed-discuss
I have issue with blocking css resources. I used LoadFromFile for HTTPS sites.


### Pagespeed

 

pagespeed
ProcessScriptVariables on;

pagespeed
LoadFromFile "http://$host" "$document_root";

pagespeed
FileCachePath /var/ngx_pagespeed_cache;





Here is my Pagespeed configuration:


pagespeed on;

 

pagespeed
RewriteLevel PassThrough;

#pagespeed EnableFilters fallback_rewrite_css_urls;

pagespeed
EnableFilters combine_css;

pagespeed
EnableFilters combine_javascript;


 

# Needs to exist and be writable by nginx.  Use tmpfs for best performance.

pagespeed
MemcachedThreads 1;

pagespeed
MemcachedServers "127.0.0.1:11211";

pagespeed
FileCachePath /var/ngx_pagespeed_cache;


 

 
# Filter settings

#pagespeed RewriteLevel CoreFilters;

pagespeed
EnableFilters collapse_whitespace,remove_comments;

pagespeed
EnableFilters insert_dns_prefetch;


 

### rewrite css

#pagespeed EnableFilters rewrite_css;


 

# improve resource cacheability

pagespeed
EnableFilters extend_cache;

# enable JavaScript minification

pagespeed
EnableFilters rewrite_javascript;


 

# enable image optimization

pagespeed
EnableFilters rewrite_images;


 

# Compress images

pagespeed
EnableFilters recompress_images;

pagespeed
EnableFilters recompress_jpeg;

pagespeed
EnableFilters recompress_png;

# disable particular filter(s) in CoreFilters

#pagespeed DisableFilters rewrite_images;

pagespeed
EnableFilters defer_javascript;

pagespeed
EnableFilters prioritize_critical_css;


 

# PageSpeed Cache Purge

pagespeed
EnableCachePurge on;

pagespeed
PurgeMethod PURGE;


 

#pagespeed EnableFilters combine_css,combine_javascript;


 

# rewrite CSS to load page-rendering CSS rules first.

pagespeed
EnableFilters prioritize_critical_css;

# flatten CSS files by replacing @import with the imported file

pagespeed
EnableFilters flatten_css_imports;

pagespeed
CssFlattenMaxBytes 5120;

# remove tags with default attributes

pagespeed
EnableFilters elide_attributes;


 


 


 

location
~ "^/pagespeed_static/" { allow 127.0.0.1; deny all;}

location
~ "^/ngx_pagespeed_beacon$" { allow 127.0.0.1; deny all; }


 


 


 

location
/ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }

location
/ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }

location
/ngx_pagespeed_message { allow 127.0.0.1; deny all; }

location
/pagespeed_console { allow 127.0.0.1; deny all; }

location
~ ^/pagespeed_admin { allow 127.0.0.1; deny all; }

location ~ ^/
pagespeed_global_admin { allow 127.0.0.1; deny all; }

location
~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {

  add_header
"" "";

}


 

pagespeed
ImplicitCacheTtlMs 3600000000000;

pagespeed
LoadFromFileCacheTtlMs 360000000000;




How can I fix the blocking css resource?


Otto van der Schaaf

unread,
Aug 31, 2017, 7:59:57 AM8/31/17
to mod-pagespeed-discuss
The prioritize_critical_css filter needs a few full page loads to learn about which css is critical.
This may vary per user-agent so you may need to run a couple tests before PSI receives the fully optimized results.

Otto

--
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/ad7d3343-a27d-414b-ad82-9ad421eb0ccd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages