pagespeed

JPG File Size Optimization - PHP, ImageMagick, & Google's Page Speed

五迷三道 提交于 2019-11-29 02:10:27
I have photo gallery code that does image re-sizing and thumbnail creation. I use ImageMagick to do this. I ran a gallery page through Google's Page Speed tool and it revealed that the re-sized images and thumbnails both have about an extra 10KB of data (JPEG files specifically). What can I add to my scripts to optimize the file size? ADDITIONAL INFORMATION I am using the imagick::FILTER_LANCZOS filter with a blur setting of 0.9 when calling the resizeImage() function. JPEGs have a quality setting of 80 . Sonny I found this SO question, " Tools for JPEG optimization? ", that has some good

How to respect “Serve static content from a cookieless domain” page speed rule in IIS6?

回眸只為那壹抹淺笑 提交于 2019-11-29 01:25:16
How to respect "Serve static content from a cookieless domain" page speed rule in IIS6? To create a cookieless site (or subdomain, which is a very common best-practice) in IIS6/IIS7/IIS7.5 is simple : you need to tell the website that you are not to use cookies :) Which means in IIS terms, not to use a session . This can be achieved in IIS6/IIS7 via two ways. Modifying the Web.config file (my personal recommendation) Using the IIS Manager GUI to find the setting and changing it. IMPORTANT Before you do any testing, you must must must clear all cookies (or all cookies for the domain u are

.htaccess: How to “Specify a cache validator”?

别等时光非礼了梦想. 提交于 2019-11-28 20:09:07
问题 I'm running Google PageSpeed on my site and it's tell me that I need to "Specify a cache validator." The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources: ... then it lists images, CSS, JS, etc. According to http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching: Set the Last-Modified date to

Loading external javascript via async script tag at the end of a webpage

不想你离开。 提交于 2019-11-28 14:47:45
Loading external javascript via async script tag at the end of a webpage I'm trying to find out what is the best way to load javascript in terms of page speed. Let's take this example: FILE.JS: // Synchronous delay of 5 seconds var timeWhile = new Date().getTime(); while( new Date().getTime() - timeWhile < 5000 ); And FILE.HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Test</title> </head> <body> SOME HTML <script src="file.js" async></script> </body> </html> Now do the following: Open Firefox Go to the url where you put file.js (so after going there file.js must be stored

Do Images Load Faster in HTML or CSS?

*爱你&永不变心* 提交于 2019-11-28 05:21:31
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'); } <div class="image"></div> This can easily be verified using Firebug (under Net), Chrome Developer Tools

JPG File Size Optimization - PHP, ImageMagick, & Google's Page Speed

这一生的挚爱 提交于 2019-11-27 21:50:56
问题 I have photo gallery code that does image re-sizing and thumbnail creation. I use ImageMagick to do this. I ran a gallery page through Google's Page Speed tool and it revealed that the re-sized images and thumbnails both have about an extra 10KB of data (JPEG files specifically). What can I add to my scripts to optimize the file size? ADDITIONAL INFORMATION I am using the imagick::FILTER_LANCZOS filter with a blur setting of 0.9 when calling the resizeImage() function. JPEGs have a quality

How to respect “Serve static content from a cookieless domain” page speed rule in IIS6?

给你一囗甜甜゛ 提交于 2019-11-27 15:55:21
问题 How to respect "Serve static content from a cookieless domain" page speed rule in IIS6? 回答1: To create a cookieless site (or subdomain, which is a very common best-practice) in IIS6/IIS7/IIS7.5 is simple : you need to tell the website that you are not to use cookies :) Which means in IIS terms, not to use a session . This can be achieved in IIS6/IIS7 via two ways. Modifying the Web.config file (my personal recommendation) Using the IIS Manager GUI to find the setting and changing it.

How can I configure Sitecore so that it generates absolute links to media items?

不打扰是莪最后的温柔 提交于 2019-11-27 06:12:57
问题 <sc:Image> and <sc:FieldRenderer> , when rendering a MediaItem, generate html code that looks like the following: <img src="~/media/twitter.gif" alt="Twitter" width="100" height="22" /> Notice the relative path used in src attribute: this means that when such an image is reused on multiple pages, the browser has to fetch it multiple times (e.g. on page http://example.com/ and http://example.com/about-us/). When I generate the img tag in code, I can use the following snippet to force an

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

陌路散爱 提交于 2019-11-27 05:49:14
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/images/widgets/en/feedback_tab_white.png could save 262B (11% reduction). Losslessly compressing http:/

Eliminate external render-blocking

青春壹個敷衍的年華 提交于 2019-11-27 05:49:04
问题 PageSpeed Insights suggests me to: "Eliminate external render-blocking Javascript and CSS in above-the-fold content. Your page has 1 blocking CSS resources. This causes a delay in rendering your page. Optimize CSS delivery for the following resources: http://itransformer.es/css/c0f9425.css" The css file c0f9425.css is the combined file with jquery-ui.css file and custom one. I don't really understand this point. How should I follow this suggestion? 回答1: Google suggests you to put the