New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images are inlined into CSS styles in IE7 if Firefox renders them first. #781

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 9 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Apr 6, 2015

I'm working on submitting a repro testcase.

Original issue reported on code.google.com by jmara...@google.com on 12 Sep 2013 at 2:51

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Test script showing the bug:

#!/bin/sh

chrome_ua="Mozilla/5.0 (Linux; Android 4.2.2; Nexus 10 Build/JDQ39) \
AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1408.0 Safari/537.31"

ie7_ua="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)"

ff_ua="Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.10) \
Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"

url="http://$(hostname):8080/mod_pagespeed_test/bug781/bug781.html"
cache_flush="/usr/local/apache2/pagespeed_cache/cache.flush"

function warm_and_run {
  echo -n $1 ...
  wget -q -O /dev/null $url --user-agent="$2"
  sleep 2
  wget -q -O - "$url" --user-agent="$2" | egrep '(style|img)'
}

touch "$cache_flush"; echo Clearing cache for FF First; sleep 5
warm_and_run Firefox "$ff_ua"
warm_and_run IE7 "$ie7_ua"
warm_and_run Chrome "$chrome_ua"

echo ""
touch "$cache_flush"; echo Clearing cache for IE First; sleep 5
warm_and_run IE7 "$ie7_ua"
warm_and_run Firefox "$ff_ua"
warm_and_run Chrome "$chrome_ua"


echo ""
touch "$cache_flush"; echo Clearing cache for Chrome; sleep 5
warm_and_run Chrome "$chrome_ua"
warm_and_run IE7 "$ie7_ua"
warm_and_run Firefox "$ff_ua"



This requires new files per this diff:

Index: install/debug.conf.template ====
*************** Header append 'X-Extra-Header' '1'
*** 259,264 ****
--- 259,270 ----
    Header append 'Cache-Control' 'no-store'
  </Directory>

+ <Directory "@@APACHE_DOC_ROOT@@/mod_pagespeed_test/bug781" >
+   ModPagespeedCssImageInlineMaxBytes 3000
+   ModPagespeedEnableFilters convert_png_to_jpeg
+   ModPagespeedJpegRecompressionQuality 50
+ </Directory>
+ 
  # However we should not allow user-specified cache-control on
  # rewritten HTML or resources.  This setting helps us make
  # sure that we strip any user-specified cache-control when
==== (added) install/mod_pagespeed_test/bug781/bug781.html ====
*** /dev/null   2013-09-06 08:57:19.702271016 -0400
***************
*** 0 ****
--- 1,2 ----
+ <img width=10 height=10 src="small.png"/>
+ <p style="width:20px;height:20px;background-image:url(small.png);"></p>
==== (added) 
/home/jmarantz/dev/inst/google3/net/instaweb/apache/install/mod_pagespeed_test/b
ug781/small.png ====
*** /dev/null   2013-09-06 08:57:19.702271016 -0400
***************
*** 0 ****
--- 1 ----
+ Binary file: md5=1f6ddeefb00e3eb173f7bbabe0f1a715, size=136


The .png file can be any small file, e.g. a copy of 
mod_pagespeed_example/images/images/disclosure_arrow_dk_grey.png

Original comment by jmara...@google.com on 12 Sep 2013 at 3:10

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 6 Nov 2013 at 8:41

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

i'm taking this

Original comment by jmara...@google.com on 16 Dec 2013 at 2:10

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 17 Dec 2013 at 1:14

  • Changed state: Started
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Fixed & waiting review.

Original comment by jmara...@google.com on 17 Dec 2013 at 4:39

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jefftk@google.com on 30 Dec 2013 at 5:59

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 30 Dec 2013 at 6:01

  • Added labels: Milestone-v31, release-note
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Was fixed in https://code.google.com/p/modpagespeed/source/detail?r=3689

Original comment by jmara...@google.com on 3 Mar 2014 at 11:49

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by hui...@google.com on 5 Mar 2014 at 8:42

  • Changed title: Images are inlined into CSS styles in IE7 if Firefox renders them first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment