New sites testing 1.5.27.1

19 views
Skip to first unread message

theartofweb

unread,
Apr 20, 2013, 8:13:15 AM4/20/13
to mod-pagespeed...@googlegroups.com
The following websites are now running beta 1.5.27.1

(we have disabled rewrite_images and blocked Serf from accessing image files on this server, so need ModPagespeedAllow to grant access.)

* www.gdaypubs.com.au (long pages, small photos)

  ModPagespeedAllow *.jpg
  ModPagespeedEnableFilters lazyload_images
  ModPagespeedLazyloadImagesBlankUrl "/spacer.gif"

* www.charlottepass.com.au (larger photos)

  ModPagespeedAllow *.jpg
  ModPagespeedEnableFilters prioritize_critical_css
  ModPagespeedEnableFilters inline_preview_images
  ModPagespeedMaxInlinedPreviewImagesIndex 4
  ModPagespeedMinImageSizeLowResolutionBytes 5120
  ModPagespeedEnableFilters lazyload_images
  ModPagespeedLazyloadImagesBlankUrl "/spacer.gif"

For Charlotte Pass the first four JPEG images on the page have inline_preview_images while the remainder become lazyload_images.
Images of other types are skipped and not counted against ModPagespeedMaxInlinedPreviewImagesIndex.

Q. Is there/can we have an option for inline_preview_images to target/count only JPEG images (e.g. by regex)?
Q. Can we use lazyload_images without also having to optimise images and/add them to the cache?

On the CP website:
  • there is an empty <style></style> tag in HEAD;
  • IE conditional comments have been left in place (as per release comments); and
  • with JavaScript disabled, the "click here" link is obscured by the background (see: http://www.charlottepass.com.au/plan)
Duncan

Jud Porter

unread,
Apr 26, 2013, 10:44:36 AM4/26/13
to theartofweb, mod-pagespeed...@googlegroups.com
Hey Duncan, sorry for the late reply. Your email slipped to the bottom of my inbox. Replies inline.


Q. Is there/can we have an option for inline_preview_images to target/count only JPEG images (e.g. by regex)?
We don't currently have an option like this, but it's something we could consider. I'd like to understand the motivation though. Is there an issue inlining other image types?

Q. Can we use lazyload_images without also having to optimise images and/add them to the cache?
Lazyload should be independent of other image optimizations. You can disable the rewrite_images filter and just enable lazyload. You can test this by adding ?ModPagespeedFilters=lazyload_images query param to an MPS enabled site, which will only enable the lazyload filter.

On the CP website:
  • there is an empty <style></style> tag in HEAD;
This happened when none of the selectors in a CSS file ended up in the critical selector set. We've got a fix forthcoming for this though so that we don't insert these empty style blocks any longer. But it's a good sign that we were able to optimize away an entire css file!
Is the redirect not happening for you? I just test with JS disabled and it seems to redirect to ?ModPagespeed=noscript correctly. 

Thanks again for testing!

theartofweb

unread,
Apr 27, 2013, 4:15:33 AM4/27/13
to mod-pagespeed...@googlegroups.com, theartofweb
Q. Is there/can we have an option for inline_preview_images to target/count only JPEG images (e.g. by regex)?
We don't currently have an option like this, but it's something we could consider. I'd like to understand the motivation though. Is there an issue inlining other image types?

Our sites usually start with a few small (PNG, GIF, spacer) graphics and then one or more larger JPEGs in the content area.  To avoid inlining the small graphics we use ModPagespeedMinImageSizeLowResolutionBytes, but then ModPagespeedMaxInlinedPreviewImagesIndex still needs to be large enough to count all the small graphics, which varies between websites.

What we'd like to be able to do is either:
  • inline the first n images larger than ModPagespeedMinImageSizeLowResolutionBytes; or
  • inline the first n images matching *.jpg or */large/* similar regex.
Q. Can we use lazyload_images without also having to optimise images and/add them to the cache?
Lazyload should be independent of other image optimizations. You can disable the rewrite_images filter and just enable lazyload. You can test this by adding ?ModPagespeedFilters=lazyload_images query param to an MPS enabled site, which will only enable the lazyload filter.

On one of our servers we have disabled image rewriting at the global level:
 
    ModPagespeedInheritVHostConfig on

    ModPagespeedDisableFilters rewrite_images,recompress_images,recompress_jpeg

    ModPagespeedDisallow *.jpg*
    ModPagespeedDisallow *.JPG
    ModPagespeedDisallow *.jpeg
    ModPagespeedDisallow *.gif*

and then just for a couple of virtual hosts enable lazyload_images:

  ModPagespeedAllow *.jpg
  ModPagespeedEnableFilters lazyload_images
  ModPagespeedLazyloadImagesBlankUrl "/spacer.gif"

For those vhosts we immediately see optimised JPEG images appearing in the cache and on the website.
 
Thanks again for testing!

Jud Porter

unread,
Apr 29, 2013, 5:10:04 PM4/29/13
to theartofweb, mod-pagespeed...@googlegroups.com
Looking at http://www.gdaypubs.com.au/blog.html, it looks like the current configuration is just cache extending the image URLs, not actually rewriting them.

219528bf2e2077cc34d3471332c4ea8f
219528bf2e2077cc34d3471332c4ea8f

You can also test this by viewing http://www.gdaypubs.com.au/blog.html?ModPagespeedFilters=-extend_cache. The reason the images show up in mod_pagespeed's cache is because mod_pagespeed needs to fetch the image to add the image's content hash for the cache extension scheme.


Your point on the behavior of ModPagespeedMaxInlinedPreviewImagesIndex is well taken. That option is confusing to me, I'd expect it to behave as a limit on the number of images that it will inline, but that's not what it does. One thing you could try is setting ModPagespeedMaxInlinedPreviewImagesIndex to -1 (meaning inline all images) and as long as you have critical image beaconing enabled, only the critical images (larger than ModPagespeedMinImageSizeLowResolutionBytes) will be inlined. We should take another look at this option though, as I agree that the behavior is a little confusing.

theartofweb

unread,
Apr 30, 2013, 3:50:17 AM4/30/13
to mod-pagespeed...@googlegroups.com, theartofweb
Looking at http://www.gdaypubs.com.au/blog.html, it looks like the current configuration is just cache extending the image URLs, not actually rewriting them.

219528bf2e2077cc34d3471332c4ea8f
219528bf2e2077cc34d3471332c4ea8f

You can also test this by viewing http://www.gdaypubs.com.au/blog.html?ModPagespeedFilters=-extend_cache. The reason the images show up in mod_pagespeed's cache is because mod_pagespeed needs to fetch the image to add the image's content hash for the cache extension scheme.

You're right.  I was confused by the different file sizes between the website and cache files, but an HTTP request returns the same Content-Length:
Disabling extend_cache_images stops them entering the cache, and both lazyload_images and inline_preview_images now work as expected using the original image URLs.  Much better (-;

Your point on the behavior of ModPagespeedMaxInlinedPreviewImagesIndex is well taken. That option is confusing to me, I'd expect it to behave as a limit on the number of images that it will inline, but that's not what it does. One thing you could try is setting ModPagespeedMaxInlinedPreviewImagesIndex to -1 (meaning inline all images) and as long as you have critical image beaconing enabled, only the critical images (larger than ModPagespeedMinImageSizeLowResolutionBytes) will be inlined. We should take another look at this option though, as I agree that the behavior is a little confusing.

That's what I thought was meant to happen.  I suspect the behaviour/documentation doesn't take into account ModPagespeedMinImageSizeLowResolutionBytes being set to a positive value.
 

theartofweb

unread,
May 8, 2013, 4:38:42 AM5/8/13
to mod-pagespeed...@googlegroups.com
I was wrong about images no longer appearing in the ModPagespeed cache after disabling both rewrite_images and extend_cache_images.  After enabling lazyload_images for a new website there is now a cache directory with 15Mb of image files:


Global config:

    ModPagespeedDisableFilters rewrite_images,extend_cache_images
    ModPagespeedDisableFilters inline_css,inline_javascript
    ModPagespeedDisableFilters trim_urls

    ModPagespeedEnableFilters move_css_to_head,move_css_above_scripts
    ModPagespeedEnableFilters rewrite_css,rewrite_javascript
    ModPagespeedEnableFilters outline_css,outline_javascript

    ModPagespeedForbidFilters rewrite_images,extend_cache_images

    ModPagespeedDisallow *.jpg*

Vhost config:

  ModPagespeedAllow *.jpg
  ModPagespeedEnableFilters lazyload_images
  ModPagespeedLazyloadImagesBlankUrl "/spacer.gif"


The ModPagespeed images are not being displayed on the website, so I'm not sure why it needs to build a cache?!?

Sample IMG:

<img pagespeed_lazy_src="/images/small/product_5491_0.jpg" width="230" height="230" border="0" alt="Cosima Balancing Foaming Cleanser" src="/spacer.gif" onload="pagespeed.lazyLoadImages.loadIfVisible(this);">

Matt Atterbury

unread,
May 8, 2013, 9:11:05 AM5/8/13
to theartofweb, mod-pagespeed-beta-testers
Do questions:
* Are you sure these cache files aren't old? Did you blow away the cache directory after disabling the image rewriters?
* Could you post an ls -lR of the cache directory please?

ta, m.
--
"Klaatu barada nikto"                          (754) 444-6288

theartofweb

unread,
May 8, 2013, 9:37:45 AM5/8/13
to mod-pagespeed...@googlegroups.com, theartofweb
1)

I'm certain there was no /images/ directory in the cache for this website before enabling lazyload_images.  The /images/ directory and files only appeared for this website after enabling the new filter, which was after disabling rewrite_images and extend_cache_images.

theartofweb

unread,
May 8, 2013, 10:06:18 AM5/8/13
to mod-pagespeed...@googlegroups.com, theartofweb
Actually all I have to do is grant ModPagespeed access to the images and it starts adding them to the cache.  So it's not specific to the new filters.  I just can't find a way to stop it.

    ModPagespeedDisableFilters rewrite_images,extend_cache_images


State of ModPagespeed cache directory:

du: cannot access `,2Fwww.sequinsandsand.com.au/images': No such file or directory

Added to vhost file:

  ModPagespeedAllow *.jpg

After one visit to the homepage:


On Wednesday, May 8, 2013 4:11:05 PM UTC+3, Matt Atterbury wrote:

Matt Atterbury

unread,
May 8, 2013, 11:38:20 AM5/8/13
to theartofweb, mod-pagespeed-beta-testers
Coud you try enabling ModPagespeedLoadFromFiles for the images directory?
We currently suspect we're reading and caching these files unnecessarily.

theartofweb

unread,
May 9, 2013, 7:05:42 AM5/9/13
to mod-pagespeed...@googlegroups.com, theartofweb
It's actually not an option for this site, or not simple, as some of the image URLs are hooked to scripts using mod_rewrite and not static files.
I'll try enabling it on another site to see what happens (when I have some time).

theartofweb

unread,
May 11, 2013, 4:42:57 AM5/11/13
to mod-pagespeed...@googlegroups.com, theartofweb
I can confirm that image files are no longer cached when the following conditions are met:
  • rewrite_images disabled;
  • extend_cache_images disabled; and
  • ModPagespeedLoadFromFile used for all images.
Reply all
Reply to author
Forward
0 new messages