1.10.33.0 serving webp images to Safari & Firefox

296 views
Skip to first unread message

Hans van Eijsden

unread,
Dec 15, 2015, 9:51:18 AM12/15/15
to ngx-pagespeed-discuss
Hi all,

First of all, thanks for the 1.10 update. I love the gzip compression of the cache content, it really makes the memcached more efficient.
Since this update I have a problem with displaying images. The problem website is http://www.lasera.nl - when I visit the site with Chrome, all is well. But after I visit the site with Chrome and I open it with Safari or Firefox, some images cannot be displayed because ngx_pagespeed made them .webp (and those browsers don't display webp).
With the previous version, all was well.
I don't use a downstream cache. These are the enabled filters: http://pastebin.com/R5N65PXr

What information do you need?
I use nginx 1.9.9 on Debian Jessie, installed with these instructions: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source

Thanks!

Jeff Kaufman

unread,
Dec 15, 2015, 10:09:24 AM12/15/15
to ngx-pagesp...@googlegroups.com
Thanks for the report! This sounds like Issue #1092 [1] but the fix
for that was included in 1.10 [2] so it's probably a new bug.

Trying to repro this, it definitely looks like we're sending webp even
if the browser hasn't demonstrated support. For example, even a
simple "curl -sS http://www.lasera.nl/" gets webp responses.

Still looking.

[1] https://github.com/pagespeed/mod_pagespeed/issues/1092
[2] https://github.com/pagespeed/mod_pagespeed/commit/c5d13af6252a3682d8e68ffa6409089711693dc1
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ngx-pagespeed-di...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
> For more options, visit https://groups.google.com/d/optout.

Jeff Kaufman

unread,
Dec 15, 2015, 10:15:51 AM12/15/15
to ngx-pagesp...@googlegroups.com
I loaded http://www.lasera.nl/?PageSpeedFilters=+debug,-add_instrumentation
first in chrome, and I see in one section:

<img src="data:image/webp;base64,..." alt=Logo
id=pagespeed_img_FT1aivPbNE><!--Resource headers are preventing
rewriting of http://www.lasera.nl/wp-content/uploads/2015/11/xScreen-Shot-2015-10-26-at-21.39.13.png.pagespeed.ic.lT7YUeZyey.webp--><!--Image
does not appear to need resizing.--><!--Image has transparent pixels,
is sensitive to compression noise, and has no animation.-->

This looks very wrong: why is it referencing a .pagespeed. resource?
Why is it saying resource headers prevent rewriting when I see it with
normal rewritable headers [1], why is it saying rewriting isn't
allowed when it has clearly rewritten it?

[1] headers http://www.lasera.nl/wp-content/uploads/2015/11/xScreen-Shot-2015-10-26-at-21.39.13.png.pagespeed.ic.lT7YUeZyey.webp
HTTP/1.1 200 OK
Content-Type: image/webp
Content-Length: 2050
Connection: keep-alive
Keep-Alive: timeout=300
Link: <http://www.lasera.nl/wp-content/uploads/2015/11/Screen-Shot-2015-10-26-at-21.39.13.png>;
rel="canonical"
Server: nginx
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Date: Tue, 15 Dec 2015 15:11:14 GMT
Expires: Wed, 14 Dec 2016 15:11:14 GMT
Cache-Control: max-age=31536000
ETag: W/"0"
Last-Modified: Tue, 15 Dec 2015 15:11:14 GMT
X-Page-Speed: 1.10.33.0-7562

Jeff Kaufman

unread,
Dec 15, 2015, 10:25:08 AM12/15/15
to ngx-pagesp...@googlegroups.com
And when fetching that with curl I get:

<img src="wp-content/uploads/2015/11/xScreen-Shot-2015-10-26-at-21.39.13.png.pagespeed.ic.lT7YUeZyey.webp"
alt=Logo width=214 height=80><!--Image does not appear to need
resizing.--><!--Image has transparent pixels, is sensitive to
compression noise, and has no animation.--><!--The image was not
inlined because device does not support inlinling.-->

So we're correctly figuring out that curl is not on the list of things
that support inlining, but have no problem feeding it webp if we've
already served webp to chrome.

Jeff Kaufman

unread,
Dec 15, 2015, 10:54:34 AM12/15/15
to ngx-pagesp...@googlegroups.com
Reproduced locally:

1. Flush cache
2. run curl -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73
Safari/537.36' -H 'x-chrome-uma-enabled: 1' -H 'accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
localhost:8050/mod_pagespeed_example/rewrite_images.html?PageSpeedFilters=+convert_jpeg_to_webp,+collapse_whitespace
3. run it again, see that there's webp the second time
4. run localhost:8050/mod_pagespeed_example/rewrite_images.html?PageSpeedFilters=+convert_jpeg_to_webp,+collapse_whitespace
, see no webp

Hans van Eijsden

unread,
Dec 15, 2015, 11:24:35 AM12/15/15
to ngx-pagespeed-discuss
Thanks Jeff for digging this!

I temporarily disabled webp filters for now:

# Temporarily disable webp filters.  This block can be removed after 
# upgrading to 1.10.33.1 or later. 
    pagespeed DisableFilters convert_jpeg_to_webp; 
    pagespeed DisableFilters convert_to_webp_lossless; 
    pagespeed DisableFilters convert_to_web_animated;

Hans


Op dinsdag 15 december 2015 16:54:34 UTC+1 schreef Jeff Kaufman:

Maksim Orlovich

unread,
Dec 15, 2015, 11:25:15 AM12/15/15
to ngx-pagespeed-discuss
You probably also want to flush our cache.
>> >>>> email to ngx-pagespeed-di...@googlegroups.com.
>> >>>> Visit this group at
>> >>>> https://groups.google.com/group/ngx-pagespeed-discuss.
>> >>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ngx-pagespeed-di...@googlegroups.com.

Hans van Eijsden

unread,
Dec 15, 2015, 11:25:52 AM12/15/15
to ngx-pagespeed-discuss
Done, thanks!

Op dinsdag 15 december 2015 17:25:15 UTC+1 schreef Maksim Orlovich:
>> >>>> email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
>> >>>> Visit this group at
>> >>>> https://groups.google.com/group/ngx-pagespeed-discuss.
>> >>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ngx-pagespeed-discuss+unsub...@googlegroups.com.

Jeff Kaufman

unread,
Dec 15, 2015, 2:09:08 PM12/15/15
to ngx-pagesp...@googlegroups.com
I'm building binaries for a 1.10.33.1 that fixes this now.

https://github.com/pagespeed/mod_pagespeed/commit/5a51f2500128a503ce8bf436536115fa9345961e
>> >> >>>> email to ngx-pagespeed-di...@googlegroups.com.
>> >> >>>> Visit this group at
>> >> >>>> https://groups.google.com/group/ngx-pagespeed-discuss.
>> >> >>>> For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "ngx-pagespeed-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to ngx-pagespeed-di...@googlegroups.com.
>> > Visit this group at
>> > https://groups.google.com/group/ngx-pagespeed-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ngx-pagespeed-di...@googlegroups.com.

John Mase

unread,
Dec 15, 2015, 4:13:14 PM12/15/15
to ngx-pagespeed-discuss
nice when do we see official release?

Jeff Kaufman

unread,
Dec 15, 2015, 4:13:55 PM12/15/15
to ngx-pagesp...@googlegroups.com
As soon as I can get the binaries built for all the platforms, sorry!
Reply all
Reply to author
Forward
0 new messages