Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Inline images sent to browsers that don't support inline images #229

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 10 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use a browser that doesn't support inline images - most commonly browsers on 
mobile devices (Issue noted on a PSP & Nokia mobile phone) other than IE6/7.
2. Go to a site that has rewrite_images enabled, and has small images that are 
suitable for inlining. (Issue occurs on a phpBB forum - emoticons, topic icons 
and reply/quote/PM buttons aren't shown)

What is the expected output? What do you see instead?
Expected: The various icons are displayed
Occurred: The icons aren't shown. Instead a "missing image" icon is displayed 
instead.

What version of the product are you using (please check X-Mod-Pagespeed header)?
0.9.15.3-404

On what operating system?
CentOS 5.3 (OpenVZ VPS)

Which version of Apache?
2.2.3

Which MPM?
Prefork

Please provide any additional information below, especially a URL or an HTML 
file that exhibits the problem.
http://twokinds.net/forum/

Issue likely occurs as a result of 
http://www.google.com/codesearch/p?hl=en#kGe7pYmmq7E/trunk/src/net/instaweb/rewr
iter/img_rewrite_filter.cc&d=4&l=327 - apparently, the only user agent check 
done is a check if the browser is IE6/7 or not. 
Relevant thread here: 
http://groups.google.com/group/mod-pagespeed-discuss/browse_thread/thread/160bed
6b047009c6

Original issue reported on code.google.com by kyl...@twokinds.net on 8 Mar 2011 at 6:49

@GoogleCodeExporter
Copy link
Author

Also, http://code.google.com/speed/page-speed/docs/filter-image-optimize.html 
says "Image inlining is user-agent-sensitive; we do not inline images for older 
browsers that do not support the data: uri format." in the Risks section. 
However, it also says "The filter can also inline small image files by using 
the data:uri format. This does not happen on IE7 and earlier." in the 
Description, so the documentation could be clarified too.

Original comment by kyl...@twokinds.net on 8 Mar 2011 at 7:15

@GoogleCodeExporter
Copy link
Author

Do you know what mobile user agents don't support image inlining?  I haven't so 
far found a guide to browsers that don't support inlining---but I've not done 
mobile content generation, so I suspect there are places I haven't thought to 
look.  This optimization may be particularly important for mobile browsers (for 
example, the w3c recommend it for mobile css), so we don't want to disable it 
entirely.  We could whitelist browsers instead, but that's not future-proof and 
we expect new browsers will by and large support image inlining (especially as 
the higher-end mobile browsers are adopted in increasingly lower-end devices).

Original comment by jmaes...@google.com on 8 Mar 2011 at 1:29

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 8 Mar 2011 at 3:19

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Note, as a work-around you can turn off image inlining completely for your site 
by setting:

ModPagespeedImgInlineMaxBytes 0

See documentation: 
http://code.google.com/speed/page-speed/docs/filter-image-optimize.html

Original comment by sligocki@google.com on 8 Mar 2011 at 3:31

@GoogleCodeExporter
Copy link
Author

Original comment by jmaes...@google.com on 9 Mar 2011 at 3:39

@GoogleCodeExporter
Copy link
Author

Well, I can confirm that inlining works on Safari & Opera Mini on an iPod 
Touch, and Opera Mobile on a Nokia E51. As I noted, inlining dies on the 
built-in browser on the Nokia though. 

A sample user agent string for a Nokia phone would be NokiaE52-1/SymbianOS/9.1 
Series60/3.0 3gpp-gba. I don't have access to the raw access log for the VPS at 
this moment, but will get it later today and post the UA string from my Nokia.

As for your point about whitelisting/blacklisting, I agree with that. At this 
time, I think blacklisting the most common browsers that won't work with image 
inlining would be the most effective. Going from my Analytics stats, right now 
the major ones I want to test would be the Blackberry browser and the browser 
in Playstation 3s/Portables. The remaining ones are browsers like Camino, 
RockMelt, SeaMonkey, Konqueror and so on, but they only make up 0.5% of total 
visitors right now...

Original comment by kyl...@twokinds.net on 10 Mar 2011 at 7:39

@GoogleCodeExporter
Copy link
Author

FYI, browserscope has some data on this:

http://www.browserscope.org/?category=network (See data: URL column)

I'm not sure if they can help with User-Agent identification.

Original comment by sligocki@google.com on 10 Mar 2011 at 8:25

@GoogleCodeExporter
Copy link
Author

Thanks for the browserscope pointer, I always forget about them.  I think that 
plus the WURFL data should allow us to come up with a vaguely reasonable 
user-agent blacklist.

Original comment by jmaes...@google.com on 10 Mar 2011 at 9:37

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

We have a preliminary (and fairly conservative) whitelisting fix in our trunk 
now.  It would be nice if folks could give this a try.  It's on by default and 
will be in our next release.

Original comment by jmaes...@google.com on 30 Jun 2011 at 9:54

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant