Lofesa commented on issue #1977: TypeError: pagespeed.CriticalImages is undefined URL: https://github.com/apache/incubator-pagespeed-mod/issues/1977#issuecomment-579661182 Hi @MrTschi Some things: 1.- When pagespeed is off (url/?PageSpeed=off) the main page have cache-control= no-cache,private. Pagespeed need that pages and resources are public cacheable. 2.- Your page don´t show main elements w/o javascript enabled and don´t have an alternative to those main elements, so you don´t need to enable the support noscript filter. Put pagespeed `SupportNoScriptEnabled false;` in your config. 3.- You serve only 1 css file from your domain, so don´t need the combine css filter: `pagespeed DisableFilters combine_css;` Same with javascript files: `pagespeed DisableFilters comine_`js; 4.- You have enabled the inline css and js filters , but had no changed the default max size to inline files, so 2 things: a) disable the inline filters `pagespeed DisableFilters inline_css;` `pagespeed DisableFilters nline_javascript;` b) make the size of max inline filter grether than the default: `pagespeed CssInlineMaxBytes bytes;` `pagespeed JsInlineMaxBytes bytes;` 5.- To inline the google fonts css you need: a) auth the domain `pagespeed Domain https://fonts.googleapis.com;` b) Make the CssInlineMaxBytes bigger that the amount of these css 6.- The filter dns-prefecht make the dns resolution faster but then need to connect to the domain. Consider to disable this filter and put a link rel="preconnect" in your pages. 7.- You have enabled the inline_images, so you need to set an apropiate: a) `pagespeed MinImageSizeLowResolutionBytes MinBytes;` minimun size of images to inline b) `pagespeed EnableFilters insert_image_dimensions;` 8.- You use the make_google_analytics_async filter, I think this not needed as far as these js snipets have changed to work async and you load the analytics.js from google tags. 9.- You use the hint_preload_subresources filter. Don´t use it. Had an inestable behaviuor, some times insert the rigth header, some times not, some times inser the rewrited and the no rewrited resource.... This filter is the responsible of the issue you view in Gmetrix to load the css and js files 2 times, 1 rewrited and 1 not rewrited, and in a inestable way, some times yes , some not. You don´t see it in the html code cause it work on the http headers. In the image bellow I show where the filter works, in this case it show the rigth items.  10.- I see the url changes from www to the non-www in the url bar. Maybe is a javascript that changes the url? I don´t see any redirect. For prevent any issues with the authorized domain you can set this: `pagespeed Domain http*://*.living-zone.de;` This makes pagespeed work with http/https and any subdomain (www/non-www). Try these changes and see if this a better experience. P.D. Sorry for my bad english, sure I have mistakes......
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services