pagespeed

Optimizing File Cacheing and HTTP2

若如初见. 提交于 2019-11-27 05:27:37
Our site is considering making the switch to http2. My understanding is that http2 renders optimization techniques like file concatenation obsolete , since a server using http2 just sends one request. Instead, the advice I am seeing is that it's better to keep file sizes smaller so that they are more likely to be cached by a browser. It probably depends on the size of a website, but how small should a website's files be if its using http2 and wants to focus on caching? In our case, our many individual js and css files fall in the 1kb to 180kb range. Jquery and bootstrap might be more.

How does Google's Page Speed lossless image compression work?

醉酒当歌 提交于 2019-11-27 03:59:00
问题 When you run Google's PageSpeed plugin for Firebug/Firefox on a website it will suggest cases where an image can be losslessly compressed, and provide a link to download this smaller image. For example: Losslessly compressing http://farm3.static.flickr.com/2667/4096993475_80359a672b_s.jpg could save 33.5KiB (85% reduction). Losslessly compressing http://farm2.static.flickr.com/1149/5137875594_28d0e287fb_s.jpg could save 18.5KiB (77% reduction). Losslessly compressing http://cdn.uservoice.com

Do Images Load Faster in HTML or CSS?

江枫思渺然 提交于 2019-11-27 00:54:34
问题 If I load an image using this html on my sidebar <img src="http://fc06.deviantart.net/fs70/f/2012/099/d/f/stackoverflow_16x16_icon_by_muntoo_stock-d4vl2v4.png" height="200px" width="200px" alt="image" /> Would it load any faster/slower than if I instead put on the sidebar where my style.css (which is called in the header) has .image { width: 200px; height: 200px; background-image: url('http://fc06.deviantart.net/fs70/f/2012/099/d/f/stackoverflow_16x16_icon_by_muntoo_stock-d4vl2v4.png'); }

Possible to defer loading of jQuery?

前提是你 提交于 2019-11-26 23:31:37
Let's face it, jQuery/jQuery-ui is a heavy download. Google recommends deferred loading of JavaScript to speed up initial rendering. My page uses jQuery to set up some tabs which are placed low on the page (mostly out of initial view) and I'd like to defer jQuery until AFTER the page has rendered. Google's deferral code adds a tag to the DOM after the page loads by hooking into the body onLoad event: <script type="text/javascript"> // Add a script element as a child of the body function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "deferredfunctions.js";

Optimizing File Cacheing and HTTP2

China☆狼群 提交于 2019-11-26 17:33:45
问题 Our site is considering making the switch to http2. My understanding is that http2 renders optimization techniques like file concatenation obsolete , since a server using http2 just sends one request. Instead, the advice I am seeing is that it's better to keep file sizes smaller so that they are more likely to be cached by a browser. It probably depends on the size of a website, but how small should a website's files be if its using http2 and wants to focus on caching? In our case, our many

“Eliminate render-blocking CSS in above-the-fold content”

China☆狼群 提交于 2019-11-26 12:51:00
问题 I\'ve been using Google PageSpeed insights to try and improve my site\'s performance, and so far it\'s proven extremely successful. Things like deferring scripts worked beautifully, since I already had an in-house version of jQuery\'s .ready() to defer scripts until the page had loaded fully, all I had to do was inline that particular function and move the full scripts to the end of the page. That worked great. But now I find myself glaring at the one remaining yellow dot on the checklist: \