pagespeed

Defer unused CSS

感情迁移 提交于 2019-12-07 22:41:19
I have a critcal CSS process in place that prevents a flash-of-unstyled-content (FOUC) on above-the-fold content of a page. I'm stuck on 'defer unused CSS' point that's being highlighted by Google PageSpeed insights (lighthouse) and/or Chrome's Performance Audit. I've gone through other articles but they do not work. To summarize I've tried so far. loadCSS() A script that uses requestAnimationFrame Ref: CSS delivery optimization: How to defer css loading? If I delay loading the script via setTimeout by a fixed time of 3 seconds the 'defer unused CSS' issue goes away. 3 seconds is what's needed

Tools to measure the effect of individual CSS rules on page rendering speed? [closed]

给你一囗甜甜゛ 提交于 2019-12-07 19:25:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I saw that LinkedIn's new HTML5 iPad App got rid of rounded borders, i.e., border-radius:X px , to improve their page rendering speed.

PageSpeed accuses script of “render-blocking” when using external image

烈酒焚心 提交于 2019-12-07 15:43:02
问题 I have placed a script from a CDN just before the closing tag of my page's body (above </body> ). Google's PageSpeed Insights says: Eliminate render-blocking JavaScript and CSS in above-the-fold content Your page has 1 blocking script resources. This causes a delay in rendering your page. I thought scripts before the end of my </body> don't delay the rendering? After some trial and error I found out that this is caused because my page uses an external image. With the example below you can

Weird pagespeed URL for PNG image?

爷,独闯天下 提交于 2019-12-07 10:59:00
问题 I uploaded a PNG image with alpha transparency to my server with the filename logo.png, however, when the image is used on a page and I go to see it's file-path, I get: http://example.com/i/300x300xlogo.png.pagespeed.ic.0A66xVq4G9.png That file is nowhere to be seen on the server. I don't know if it affects it, but the actual image size is 400px by 400px, and I have it displayed in the HTML as 300px by 300px. (Don't ask.) Could it be my web-host doing this? Seems to prefix the file with the

Google PageSpeed Insights Prioritize visible content

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 13:57:54
I am just doing some testing on one of my random domains and when I run the domain through Google PageSpeed Insights with the following JavaScript being loaded: $("[data-min-height]").each(function() { var dataHeight = $(this).data("min-height"); var dataPercent = dataHeight / 100; $(this).css("min-height", function() { return $(window).height() * dataPercent; }); }); I get the error Prioritize visible content . If I take away the JavaScript, I no longer get the error. I am using matthiasmullie/minify to compress all my JavaScript together. Currently I have jQuery , PaulSpr/jQuery-Flex

Tools to measure the effect of individual CSS rules on page rendering speed? [closed]

情到浓时终转凉″ 提交于 2019-12-06 09:31:30
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I saw that LinkedIn's new HTML5 iPad App got rid of rounded borders, i.e., border-radius:X px , to improve their page rendering speed. This seems like it could only provide a minor improvement. I'm wondering more generally how to measure

location of .htaccess file

ⅰ亾dé卋堺 提交于 2019-12-06 08:02:57
问题 /var/www/html/My_project_folder is the path to my project. I did not find .htaccess file. I want to paste my edited .htaccess file . but i am not sure in which location i need to put? My htaccess file code is-- <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] <IfModule mod_expires.c> # Enable expirations ExpiresActive On # Default directive ExpiresDefault

Best way for JSF to defer parsing of JavaScript?

ε祈祈猫儿з 提交于 2019-12-06 04:11:53
问题 what is the best way to defer loading the JavaScript libraries (Richfaces, Primefaces, own stuff) with JSF to speed up page loading? As Google PageSpeed plugins says it is recommend to parse JavaScript when the site is loaded completely. One way to achieve this is to put the JavaScripts loads at the end of the <body> tag. An other way is to put the "defer" attribute to <script> tag, which can not be done with JSF's <h:outputScript> Tag as I saw. So, how would you do this? 回答1: Use <h

Tool for lossless image compression [closed]

妖精的绣舞 提交于 2019-12-06 03:14:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Running Google Page Speed on a public site , I saw some suggestions by the tool like the following : Losslessly compressing http://g-ecx.images-amazon.com/images/G/01/electronics/detail-page/Acer-120x120._V137848950_.gi could save 4.8KiB (26% reduction) and they also provide a link to the optimized content.But

PageSpeed accuses script of “render-blocking” when using external image

China☆狼群 提交于 2019-12-05 21:40:58
I have placed a script from a CDN just before the closing tag of my page's body (above </body> ). Google's PageSpeed Insights says: Eliminate render-blocking JavaScript and CSS in above-the-fold content Your page has 1 blocking script resources. This causes a delay in rendering your page. I thought scripts before the end of my </body> don't delay the rendering? After some trial and error I found out that this is caused because my page uses an external image. With the example below you can cause PageSpeed to detect a "render-blocking" script: <body> <img src="http://i.stack.imgur.com/oURrw.png"