pagespeed

Faster javascript processing

旧城冷巷雨未停 提交于 2019-12-13 19:19:27
问题 Just asked my first question and got a great response. So helpful. Helped me create this bit of javascript to create two random numbers on the same page. <script> window.onload = function(){ generateRandomNumber1(); generateRandomNumber2(); }</script> <script> function generateRandomNumber1(){ var n = 30; var number = Math.floor(Math.random()*n)+1; document.getElementById("random1").innerHTML = number; } function generateRandomNumber2(){ var n = 15; var number = Math.floor(Math.random()*n)+1;

Find the page load time of external URLs

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 19:18:55
问题 Is there a way to find the page load time for external URLs? My task is to compile a table of page load times for a list of URLs. I have read about the navigation timing API but could not find a way to find the page load time for an external URL that I specify in code. For example, something like http://tools.pingdom.com/fpt/ which analyzes the page load time for the URL we enter(I'm not sure if this is accurate) 回答1: http://www.webpagetest.org/ is a great tool for this. It measures the Page

Defer primefaces.js loading [duplicate]

半世苍凉 提交于 2019-12-13 19:14:59
问题 This question already has answers here : Defer loading and parsing of PrimeFaces JavaScript files (2 answers) Closed 4 years ago . The google pagespeed is indicating that loading primefaces.js is slowing down my page: From the pagespeed report: Defer parsing of JavaScript By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page. Suggestions for this page 284

Google mod_pagespeed for ajax loaded content

最后都变了- 提交于 2019-12-13 17:39:55
问题 I`m trying to optimze and convert images using mod_pagespeed and it works very good for all tags in html files. But how could it process images that loaded with js? For example images in slideshows and etc. Thanks! 回答1: mod_pagespeed normally optimizes images and other resources by detecting their URL in the HTML and then replacing the URL with a link to the optimized version. As of mod_pagespeed 1.4.26.1 however, mod_pagespeed includes a feature called In-Place Resource Optimization, which

Raspbian: PageSpeed (nginx) compliation error

隐身守侯 提交于 2019-12-13 06:57:16
问题 After executing the following commands: mkdir -p ~/bin cd ~/bin svn co http://src.chromium.org/svn/trunk/tools/depot_tools export PATH=$PATH:~/bin/depot_tools mkdir ~/mod_pagespeed cd ~/mod_pagespeed gclient config http://modpagespeed.googlecode.com/svn/tags/1.9.32.1/src/ gclient sync --force --jobs=1 # add --revision=xxxx for a specific svn revision cd src/ make AR.host="$PWD/build/wrappers/ar.sh" \ AR.target="$PWD/build/wrappers/ar.sh" \ BUILDTYPE=Release \ mod_pagespeed_test pagespeed

Image Not Caching?

有些话、适合烂在心里 提交于 2019-12-13 06:27:27
问题 I'm convinced that certain images on my site are not caching properly. I have set the headers as best I can, but it still seems like they download again every time I hit the refresh button. For example, a particular image always takes a bit over 1 second to download. This is even after it should be cached. Here are the response headers: HTTP/1.1 200 OK Date: Sun, 06 Mar 2011 12:51:52 GMT Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4

Why is my wordpress website so slow and am I having so much downtime?

随声附和 提交于 2019-12-13 06:06:32
问题 I have used Yslow and PageSpeed to find the cause, but I can't seem to figure out why my blog http://www.fotokringarnhem.nl sometimes loads blazing fast (cached files I guess), and other times takes about 10 seconds or longer to load. I am on a shared server, but haven't had problems like this with other websites on shared servers. I'm using cloudflare to speed up my blog to speed things up, but to no avail. Am I missing something? Pingdom reports of last 30 days (also see http://stats

Google PageSpeed Insights Prioritize visible content

情到浓时终转凉″ 提交于 2019-12-12 09:59:24
问题 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

How to stop render-blocking Javascript and CSS?

孤街醉人 提交于 2019-12-12 01:24:16
问题 I have tested my page on Google PageSpeed Insights and It keeps saying "Eliminate render-blocking JavaScript and CSS in above-the-fold content" It says I have 17 blocking scripts and 11 blocking CSS resources. I have tried moving all of the JS to the bottom of the page to load it last however Google is still saying I have render-blocking JS... Does anyone know how I can solve this? Thank you in advance for any help. 回答1: You need to dig more into Critical Rendering Path study. Simple Rule: In

How to Eliminate render-blocking JavaScript and CSS in above-the-fold content

心已入冬 提交于 2019-12-11 13:42:17
问题 I have speedup my desktop to 82/100, but mobile speed is still 60/100. Can anybody recommend me some tips about improving the mobile speed to 80/100. Here is link the my current Google PageSpeed Insights: https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.lutonairporttaxis.co.uk%2F&tab=mobile 回答1: There are a number of things that you could do to improve the score of your application. As PageSpeed Insights suggests, you could turn on your compression. This is an easy