Last Comment Bug 497665 - images are downloaded multiple times if defined multiple times, on Shift-Reload / Ctrl+F5
: images are downloaded multiple times if defined multiple times, on Shift-Relo...
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: Trunk
: All All
: P2 normal with 15 votes (vote)
: ---
Assigned To: Joe Drew (not getting mail)
:
: Milan Sreckovic [:milan]
Mentors:
: 501853 502195 502209 502517 502556 504184 504448 507914 508536 515629 518579 531441 533443 (view as bug list)
Depends on: 514605 528946
Blocks: 430061
  Show dependency treegraph
 
Reported: 2009-06-11 12:32 PDT by Giulio
Modified: 2010-06-28 14:37 PDT (History)
35 users (show)
mbeltzner: blocking1.9.2+
mbeltzner: blocking1.9.1.1-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
beta3-fixed
.8+
.8-fixed


Attachments
testcase (929 bytes, text/html)
2009-07-01 09:18 PDT, u88484
no flags Details
fix (4.69 KB, patch)
2009-09-03 21:04 PDT, Joe Drew (not getting mail)
bzbarsky: review+
jmuizelaar: review-
Details | Diff | Splinter Review
tests (in progress) (5.02 KB, patch)
2009-09-03 21:06 PDT, Joe Drew (not getting mail)
no flags Details | Diff | Splinter Review
Test case demonstrating broken image preloading (1.03 KB, text/html)
2009-09-16 16:29 PDT, John Simons
no flags Details
Review-related fixes (4.79 KB, patch)
2009-11-11 15:34 PST, Joe Drew (not getting mail)
jmuizelaar: review+
vladimir: review+
dveditz: approval1.9.1.8+
Details | Diff | Splinter Review
mochitests (5.82 KB, patch)
2009-11-11 15:36 PST, Joe Drew (not getting mail)
no flags Details | Diff | Splinter Review
merge to 1.9.1 (4.73 KB, patch)
2010-01-26 11:05 PST, Joe Drew (not getting mail)
jmuizelaar: review+
mbeltzner: approval1.9.1.8+
Details | Diff | Splinter Review

Description Giulio 2009-06-11 12:32:22 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99 (.NET CLR 3.5.30729)

I have a large css file which defines many background images and uses a sprite technique to show different images / icons. By it's nature it defines the same background image for many different classes. In IE 7/8 and Firefox 3.0 each image is only downloaded once after the GET request of the css file. However, in Firefox 3.5 it is being downloaded once for each time the file is refrences. I have verified this by looking at the Net panel in firebug 1.4 and using Fiddler both of which report the same data.

Reproducible: Always

Actual Results:  
Each image is downloaded however many times it is referenced in the css or a tag on the HTML page makes a reference to the css tag which requires the image.

Expected Results:  
Only download each referenced image once

CSS that causes multple downloads:

.preLoad{background-image:url(../Images/general-24.png);width:0;height:0;position:absolute;top:-10;left:-10px;}.preLoad DIV{background-image:url(../Images/backgrounds.png);}.preLoad H1{background-image:url(../Images/blank.gif);}.preLoad H2{background-image:url(../Images/icons/16x16.png);}.preLoad H3{background-image:url(../Images/icons/32x32.png);}.preLoad H4{background-image:url(../Images/ajax-loader.gif);}.preLoad H5{background-image:url(../Images/window-24.png);}.PasswordRecovery TD{text-align:left;padding:4px;}.PasswordRecovery{border:1px solid #002b82;display:block;margin:30px auto 0 auto;background-color:LemonChiffon;width:300px;padding:0;}.PasswordRecovery .Title{font-size:20px;border-bottom:1px solid #002b82;padding-bottom:3px;margin-bottom:5px;text-align:center;}.loginBox{width:726px;height:391px;background:#48690c url('../Images/login.jpg') no-repeat;color:#FFF;}.loginBox .Message{border:1px solid #4d7922;display:block;margin:30px auto 0 auto;background-color:LemonChiffon;color:#4d7922;width:300px;padding:5px;opacity:.9;filter:alpha(opacity='90');}.loginBox .loginButton{display:block;margin:0 0 5px 4px!important;width:106px;height:42px;font-size:30px;padding:4px 3px 2px 3px;text-align:center;text-decoration:none;}.loginBox .loginButton:hover{background:transparent url(../Images/general-24.png) no-repeat -400px -300px;}.loginBox .Title{font-size:30px;padding:25px 0 25px 90px;}.loginBox .login INPUT{float:left;vertical-align:middle;}.loginBox .login{font-size:12px;margin-top:82px;margin-left:520px;}.loginBox .login A{margin-left:22px;color:#FFF;}.loginBox .login LABEL{clear:right;display:block;margin-bottom:5px;vertical-align:middle;padding-top:2px;}.loginBox .inputs{float:left;width:520px;margin-top:85px;margin-left:0;}.loginBox .inputs LABEL{display:block;font-size:30px;text-align:right;float:left;width:160px;margin-right:10px;margin-bottom:10px;}.loginBox .inputs INPUT{font-size:20px;border:1px solid #4d7922;width:330px;margin-bottom:15px;color:#4d7922;height:30px;padding-top:3px;text-indent:5px;}html,body,td,th,input,textarea,select{font-family:Verdana,Arial;font-size:11px;color:#002b82;}a:active{outline:none;}a:focus{-moz-outline-style:none;}input{font-family:Verdana,Arial;font-size:11px;color:#002b82;}.Minimal input{font-size:11px;}.checkbox,.checkbox INPUT{WIDTH:13px;HEIGHT:13px;}.blockMsg{border:none!important;}body{background:#f8fcfe url('../Images/backgrounds.png') repeat-x fixed 0 -1500px;}form{margin:0;padding:0;}.leftMainBarTopOuter{background:url('../Images/general-24.png') repeat-x left -150px;margin:0 0 0 5px;}.leftMainBarTop{background:url('../Images/general-24.png') repeat-x right -150px;padding:5px 5px 9px 5px;}.leftMainBarTop .searchIcon{width:100%;height:26px;background:transparent url('../Images/general-24.png') no-repeat top right;z-index:10;}.leftMainBarBottom{border-left:1px solid #c3c3c3;border-bottom:1px solid #c3c3c3;border-right:1px solid #c3c3c3;background:#FFF url('../Images/backgrounds.png') repeat-x 0 50px;height:100%;margin:0 0 5px 5px;padding:0 5px 5px 5px;white-space:nowrap;overflow:auto;background-attachment:fixed;}.relatedItemBox{width:175px;float:right;margin-right:5px;display:inline;}.relatedItemHeader{font-weight:bold;}.relatedItemContent{padding:5px;background-color:White;overflow:auto;}.Breadcrumb{height:25px;overflow:hidden;}.Breadcrumb a div{height:19px;margin-right:3px;padding-top:3px;}.Breadcrumb a{vertical-align:middle;margin-right:2px;text-decoration:none;color:#002b82;}.Breadcrumb .ti{height:23px;padding:1px 0 0 3px;margin-left:2px;}.Breadcrumb .active:hover{background-repeat:repeat-x;background:url(../Images/general-24.png) no-repeat right -250px;color:blue;}.Breadcrumb .active:hover div{background:url(../Images/general-24.png) no-repeat left -250px;}.Breadcrumb .arrow{height:10px;padding:3px 5px 3px 3px;background:url(../Images/general-24.png) no-repeat 0 -16px;font-size:0;}.browseLink{display:block;color:#002b82;text-decoration:none;height:22px;vertical-align:middle;cursor:pointer;}.browseLink IMG{vertical-align:middle;}.browseLink .button{display:block;height:19px;padding:2px 0 1px 3px;vertical-align:middle;margin-right:5px;}.browseLink:hover{background-repeat:repeat-x;background:url(../Images/general-24.png) no-repeat right -200px;color:blue;}.browseLink:hover .button{background:url(../Images/general-24.png) no-repeat left -200px;}.browseLink .ti{display:block;height:22px;vertical-align:middle;text-indent:22px!important;overflow:hidden;padding-top:1px;white-space:nowrap;}.browseLink.blueButton{background:url(../Images/general-24.png) no-repeat right -200px;}.browseLink.blueButton .button{background:url(../Images/general-24.png) no-repeat left -200px;}.browseLink.blueButton:hover{background-position:right -250px;color:blue;}.browseLink.blueButton:hover .button{background-position:left -250px;}.browseLink.selectedGoldButton{background:url(../Images/general-24.png) no-repeat right -250px;}.browseLink.selectedGoldButton .button{background:url(../Images/general-24.png) no-repeat left -250px;}.browseLink.goldButton:hover{background:url(../Images/general-24.png) no-repeat left -250px;background-position:right -200px;color:blue;}.browseLink.goldButton:hover .button{background-position:left -200px;}.numberHighlight{margin-left:5px;color:Blue;}.ActiveSplitterBar{background-image:url('../Images/splitter/active.gif');border:none;}.spLoading{position:absolute;top:0;left:0;border:1px solid red;background:yellow;padding:5px;font-weight:bold;}.Hide{display:none;}.progressbarTodo{background:url(../Images/backgrounds.png) repeat-x 0 -3550px;border:1px solid #CCC;width:400px;height:20px;}.progressbarCurrentStep{position:relative;width:394px;height:14px;text-align:center;padding:3px;overflow:hidden;}.progressbarDone{background:url(../Images/backgrounds.png) repeat-x 0 -3570px;width:0;height:20px;}.progressTitle{display:block;width:400px;margin-bottom:10px;}.pageInfo{position:absolute;bottom:0;width:100%;border-top:3px solid #e8ba85;background:#FFF url('../Images/backgrounds.png') repeat-x 0 -50px;padding:5px;white-space:nowrap;overflow:hidden;z-index:2000;}.pageInfo .ti{text-indent:25px;}.scrollInfo{float:left;border-top:1px solid #c3c3c3;background:#FFF url('../Images/backgrounds.png') repeat-x 0 -50px;padding:3px;white-space:nowrap;overflow:hidden;z-index:1000;width:400px;text-align:center;}.personnel .locationHeader{margin:1px 5px 0 0;}.personnel .locationContent{height:50px;border-left:1px dashed #708FCD;border-bottom:1px dashed #708FCD;padding-left:5px;}.personnel .locationContent .comboBox{margin:0 0 0 6px;} .ribbonBar{width:100%;height:55px;background:url('../Images/backgrounds.png') repeat-x 0 -3000px;margin-bottom:5px;position:fixed;z-index:50;top:0;left:0;}.ribbonBarInner{width:100%;height:100%;background:url(../Images/general-24.png) no-repeat right -360px;}.ribbonBar .btndashboard{width:74px;height:55px;background:transparent url(../Images/general-24.png) no-repeat left -300px;border:none;float:left;}.ribbonBar .btndashboard:hover A{color:#002b82;}.ribbonBar .txtdashboard{position:absolute;top:35px;left:8px;}.btninventory{display:block;width:64px;margin:3px 20px 0 0;background:transparent url(../Images/general-24.png) no-repeat -200px -300px;float:left;padding:32px 0 4px 3px;}.btninventory:hover{background-position:-300px -300px;}.ribbonBar A *{cursor:hand;}.ribbonBar .button,.ribbonBar .buttonCollection{display:block;margin:3px 3px 0 0;background:transparent url(../Images/general-24.png) no-repeat left -420px;float:left;z-index:3;}.ribbonBar .button .inner .li{height:32px;width:34px;text-align:center;text-indent:0;margin:0 auto 0 auto;padding-top:2px;}.ribbonBar .button .inner span{white-space:nowrap;}.ribbonBar .button .inner .li .ti{width:18px;height:16px;margin:16px 0 0 18px;}.ribbonBar .button .inner,.ribbonBar .buttonCollection DIV.buttonCollectionInner{background:transparent url(../Images/general-24.png) no-repeat right -420px;padding-top:2px;}.ribbonBar .buttonCollection DIV.buttonCollectionInner{padding:0;height:49px;width:100%;}.ribbonBar .buttonCollection .buttonHalfHeight{display:block;width:100%;}.ribbonBar .buttonCollection .buttonHalfHeight DIV{padding-top:4px;}.ribbonBar .buttonCollection .buttonHalfHeight DIV SPAN{margin:0 0 0 5px;padding:0 0 0 2px;height:20px;text-align:left;vertical-align:middle;}.ribbonBar .buttonCollection .buttonHalfHeight:hover{background:transparent url(../Images/general-24.png) no-repeat right -550px;}.ribbonBar .buttonCollection .buttonHalfHeight:hover DIV{background:transparent url(../Images/general-24.png) no-repeat left -550px;margin-right:10px;}.ribbonBar .buttonCollection .button DIV{display:block;background:transparent url(../Images/general-24.png) no-repeat left -550px;float:left;}.ribbonBar .button .inner SPAN{display:block;margin:0 4px 0 4px;height:13px;text-align:center;padding:0 0 0 2px;line-height:.9;}.ribbonBar .button .inner .sub{position:relative;z-index:10;height:12px;border-top:1px solid #9fafcd;}.ribbonBar .button.disabled{opacity:.5;filter:alpha(opacity=50);}.ribbonBar .button.disabled:hover{background-position:left -420px;color:#486192;}.ribbonBar .button.disabled:hover .inner{background-position:right -420px;}.ribbonBar .button:hover{background-position:left -469px;}.ribbonBar .button:hover .inner{background-position:right -469px;}.ribbonBar .button:hover .inner .sub{border-top:1px solid #486192;}.ribbonBar A{text-decoration:none;color:#486192;}.ribbonBar A:hover{color:#002b82;}.subMenu{position:fixed;top:48px;z-index:2000;}.subMenuJoin{background:transparent url(../Images/general-24.png) no-repeat right -520px;height:14px;padding-right:10px;position:absolute;z-index:52;}.subMenuJoin DIV{background:transparent url(../Images/general-24.png) no-repeat left -520px;height:14px;}.subMenuBox{position:relative;top:12px;left:-5px;cursor:default;}.subMenuBox div.topleft{background:url(../Images/window-24.png) no-repeat right 0;}.subMenuBox div.topright{background:url(../Images/window-24.png) no-repeat left 0;margin-right:17px;}.subMenuBox div.bottomleft{background:url(../Images/window-24.png) bottom right no-repeat;height:15px;width:100%;}.subMenuBox div.bottomright{background:url(../Images/window-24.png) bottom left no-repeat;height:15px;margin-right:17px;padding-left:10px;}.subMenuBox div.contentHolder{padding:0 0 0 10px;height:100%;}.subMenuBox div.contentHolder .titleBar{color:#FFF;height:16px;margin-bottom:5px;padding-top:4px;}.subMenuBox div.content{overflow:auto;height:100%;font-family:Verdana,Arial;font-size:11px;color:#002b82;text-align:left;background-color:#fff;}.subMenuBox #modalToolbar{background-color:#fff;margin-left:10px;}#dvModalBox{margin-top:-30px;}#dvModalBox a.ti.close{height:14px;width:16px;margin-top:-1px;float:right;cursor:pointer;}#dvModalBox .buttonsBar{background:white;text-align:center;height:25px;}#dvModalBox .buttonsBar input{margin-right:5px;}.formBox{border:1px solid #c5c6c6;}.formBox .formHeader{background:#f9f6e6 url('../Images/backgrounds.png') repeat-x;border-bottom:1px solid #c5c6c6;height:16px;padding:4px;vertical-align:middle;color:#002b82;}.newWindow{float:right;display:block;width:17px;height:14px;background:url('../Images/general-24.png') no-repeat 0 -40px;}.formBox .formHeader span{height:15px;padding:1px 0 0 3px;white-space:nowrap;}.formBox .formContent{background:#f8fcfe url('../Images/backgrounds.png') repeat-x 0 -1500px;background-attachment:fixed;position:relative;}.formBox .formContent .formContent{background:transparent;}.formBox .formScroller{overflow:auto;}.formBox .formScroller .formHolder{margin:5px;}.formBox #fh_toolbar{height:20px;padding:5px;text-align:right;}.formContent label{display:block;float:left;width:100px;clear:left;overflow:hidden;white-space:nowrap;height:18px;margin-bottom:3px;vertical-align:middle;text-overflow:ellipsis;padding-top:2px;margin-right:2px;}.formContent label span:hover{white-space:nowrap;overflow:visible;position:absolute;background-color:LemonChiffon;padding:4px;margin-top:-4px;margin-left:-4px;}.formContent legend .calendarBox,.formContent legend .comboBox{margin:0 0 0 3px;}.formContent legend label{display:inline;width:auto;clear:none;padding:0 5px 0 3px;margin:0;}.formContent legend>input{vertical-align:middle;margin:0;padding:0;}.formContent .radioButtonList{float:left!important;padding:2px 1px;border:1px solid transparent;border-collapse:collapse;table-layout:fixed;}.formContent .radioButtonList TD{height:22px;}.formContent .radioButtonList INPUT{vertical-align:middle;}.formContent .radioButtonList label{float:none;width:auto;clear:none;overflow:visible;margin:none;display:inline;}.formContent .radioButtonListHorizontal TD{text-align:center;}.formContent .radioButtonListHorizontal INPUT{margin:0;height:13px;width:13px;}.formContent .radioButtonListHorizontal label{float:none;width:auto;clear:left;overflow:visible;margin:0;height:16px;display:inline;}.formContent .radioButtonListHorizontal{float:left;}.formContent .inputControl,.formContent select,.formContent .numeric{float:left /*!important*/;padding:2px 1px;border:1px solid #7f9db9;margin-bottom:3px;height:14px;}.formContent select{font-size:11px;padding:1px 0 0;border:1px solid #7f9db9;margin-bottom:3px;height:20px;}.formContent .rolabel{float:left /*!important*/;padding:2px 1px;margin-bottom:4px;}.formContent .calendarBox,.formContent .comboBox{margin-bottom:3px;}.GridView .calendarBox,.GridView .comboBox,.GridView .numeric{margin:0;}.numeric{text-align:right;}input[type=checkbox]{width:13px;height:13px;margin:0 3px 7px 3px;}.checkboxLabel{vertical-align:top;}.formContent .textInput{border:1px solid #7f9db9;padding:1px 2px 1px 2px;}.formContent .lblMandatory{font-weight:bold;}.formContent .lblMandatory:after{content:"*";}.formContent BR{clear:left;}.formContent .changedValue{border-bottom:1px solid #0c5403;background:#e1fedd;}.formContent textarea{margin-bottom:5px;}.formContent fieldset{-moz-border-radius-bottomleft:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border:1px solid #708fcd;padding:5px;margin:0 5px 5px 0;}.formContent fieldset legend{color:blue;}.formContent fieldset.collapsed{border:none;border-top:1px solid #708fcd;padding:5px 6px 0 6px;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;}.formContent fieldset.collapsed>*{display:none;}.formContent fieldset legend{color:blue;display:inline!important;}.formContent fieldset legend input{margin:0;}input[type=submit][disabled],a[disabled]{color:#c9c7ba;}.selectedPricing{color:darkgreen;}.validationError_cmb,.validationError_txt,.validationError_chk,.validationError_cal,.validationError_dbl,.validationError_num,.validationError{background:LemonChiffon!important;border:1px solid #b00!important;}.GridView{background-color:#ece9d8;border-right:1px solid #ece9d8;}.dvCompetitors .GridView,.dvCompetitors .GridView .scroller{border:none;}.GridView .deletedRow>td{text-decoration:line-through;background-color:#ccc;color:#555;}.GridView .selectedRow>td{background-color:Highlight!important;color:HighlightText!important;}.GridView .editRow>td{padding:0 2px 0 2px!important;}.GridView .infoBubble{background:#FDFBE1;padding:5px;border:1px solid gray;}.GridView .scroller>table>thead>tr>td,.GridView .scroller>table>tbody>tr>td,.GridView .header>table>tbody>tr>th,.GridView .header>table>thead>tr>th,.GridView .footerTable>tbody>tr>td{border-right:1px solid #ece9d8;padding:2px;}.GridView .scroller>table>thead>tr>td,.GridView .scroller>table>tbody>tr>td{border-bottom:1px solid #ece9d8;}.GridView .header td,.GridView .header th{border-bottom:1px solid #c3c3c3;border-right:1px solid #c3c3c3;background:#f4f0dd url(../Images/backgrounds.png) repeat-x 0 -2850px;padding:2px;height:23px;}.GridView.DoubleHeightHeader .header td,.GridView.DoubleHeightHeader .header th{background-position:0 -3520px;}.GridView .header{border-left:1px solid #c3c3c3;border-right:1px solid #c3c3c3;}.GridView .header input{background-color:transparent;}.GridView .filter{background:#FFF url(../Images/backgrounds.png) repeat-x 0 -2700px!important;height:17px!important;}.GridView .filterFocus{background:#f3e3bc url(../Images/backgrounds.png) repeat-x 0 -2750px!important;height:17px!important;}.GridView .filterActive{background:#f9f589 url(../Images/backgrounds.png) repeat-x 0 -2800px!important;height:17px!important;}.GridView .footer span{margin-left:3px;}.GridView .footer{border-right:1px solid #c3c3c3;border-left:1px solid #c3c3c3;border-bottom:1px solid #c3c3c3;background-color:#e9fade;}.GridView .footerTable>tbody>tr>td{border-right:1px solid #8cb771;padding:2px;}.GridView .footer .statusbar{background:#f4f0dd url(../Images/backgrounds.png) repeat-x 0 -2850px;height:19px;padding-top:3px;}.GridView .footerScroller{border-top:2px solid #2e5f0c;border-bottom:2px solid #2e5f0c;}.GridView .emptyfooter{border-top:1px solid #ECE9D8;height:0;}.GridView .scroller{border-left:1px solid #ece9d8;background-color:#fff;}.GridView.validationError .scroller{background-color:LemonChiffon!important;}.GridViewColumnSelector{border:1px solid gray;background:#f4f0dd;width:400px;text-align:left;}.GridView .ColumnSelectorBody{margin:10px 10px 0 10px;}.GridView .ColumnSelectorBody td{padding:2px;}.GridView .ColumnSelectorFooter{text-align:right;padding-left:10px;}.GridView .ColumnSelectorHeader{background:#f4f0dd url(../Images/backgrounds.png) repeat-x 0 -2850px;padding:3px;border-right:1px solid #c3c3c3;font-weight:bold;}.GridView .ColumnSelectorFooter input{margin:10px 10px 10px 0;}.GridView .ColumnInfoArea{float:left;margin-top:9px;text-align:left;}.GridView .ColumnInfo{color:#555;}.GridView .ColumnError{color:Red;font-weight:bold;}.GridView .Agg{color:blue;font-weight:normal;}.GridView .scroller .ti{display:table-cell;}.GridView td INPUT,.GridView th INPUT{margin:1px;}.GridView .updating>td{background-color:#e9eaeb!important;color:#c2c0c0;}.GridView .error>td{background-color:#CE5E5E;color:#840000;}.GridView .insertMsg{text-align:center;font-weight:bold;font-size:17px;padding-top:2px;}.GridView.Minimal td,.GridView.Minimal th{padding:0!important;}.GridView.Minimal .header th{background-position:0 -2859px;height:14px;font-weight:normal;}.GridView.Minimal .Settings,.GridView.Minimal .Excel,.GridView.Minimal .Insert{margin:0 1px 0;}.GridView.Minimal .footer .statusbar{background-position:0 -2854px;padding-top:1px;height:17px;}.GridView.Minimal .footerScroller{border-width:2px 0 0 0;}.GridView.Minimal td INPUT{margin:0;}.GridView.Minimal .insertMsg{font-size:11px;}.GridView .inputControl,.GridView select,.GridView .numeric,.GridView .calendarBox input{margin:0;padding-top:1px;}.GridView .inputControl,.GridView .numeric,.GridView .calendarBox input{height:12px;}.GridView .calendarBox{height:15px;}.GridView .comboBox{padding:0;}.GridView .comboTextBox{padding:0;height:13px;}.GridView .comboBox>table>tbody>tr td>img{height:15px;}.GridView.Minimal .inputControl,.GridView.Minimal select,.GridView.Minimal .numeric{margin:0;height:14px;}.GridView input[type=checkbox]{margin:0;}.SearchResultGrid .scroller{background:#FFF url('../Images/icons/SearchResultGrid.png') no-repeat center 125px;background-attachment:fixed;}.colourKey{border:1px solid #C3C3C3;}.ti{background-image:url('../Images/icons/16x16.png');background-repeat:no-repeat;text-indent:19px;background-position:2px 0;display:block;height:16px;}.li{background-image:url('../Images/icons/32x32.png');background-repeat:no-repeat;text-indent:38px;background-position:2px 0;display:block;height:32px;}.NoFormIcons .comboTextBox.ti,.calendarBox.ti{background-image:none;text-indent:0;}.del{background-position:2px -950px;}.gadget{background-position:2px -150px;}.collapsed{background-position:0 -250px;}.expanded{background-position:0 -200px;}.logout{background-position:0 -150px;}.systemmap{background-position:0 -200px;}.i000{background-position:2px -100px;}.i401{background-position:2px 0;}.i487{background-position:2px -50px;}.pref{background-position:2px -300px;}.i490{background-position:2px -350px;}.i413{background-position:2px -400px;}.i452{background-position:2px -450px;}.add{background-position:2px -500px;}.i551{background-position:2px -550px;}.i461{background-position:2px -600px;}.i450{background-position:2px -650px;}.i296{background-position:2px -700px;}.i491{background-position:2px -750px;}.i499{background-position:2px -800px;}.i457{background-position:2px -850px;}.i453{background-position:2px -900px;}.i495{background-position:2px -1000px;}.i412{background-position:2px -1050px;}.i652{background-position:2px -1100px;}.i284{background-position:2px -1150px;}.i561,.i465{background-position:2px -1450px;}.grid_ascx{background-position:2px -1200px;}.crystal_ascx{background-position:2px -2150px;}.olap_ascx{background-position:2px -1250px;}.close{background-position:2px -1300px;}.cal{background-position:2px -1348px;}.alert{background-position:2px -1400px;}.timer{background-position:2px -1500px;}.settings{background-position:2px -1550px;}.report_ascx{background-position:2px -1600px;}.pwizard{background-position:2px -1650px;}.arrowdown{background-position:2px -1700px;}.olapexcel{background-position:2px -1750px;}.rptbuilder{background-position:2px -1800px;}.i3di{background-position:2px -1850px;}.ti.permIcon{background:url(../Images/general-24.png) no-repeat 0 0;text-indent:45px!important;height:16px;}.i425,.i426{background-position:2px -1900px;}.i401{background-position:2px -1950px;}.tick{background-position:2px -2000px;}.admin{background-position:2px -2050px;}.none{background-position:2px -5000px;}.arrowright{background-position:2px -100px;}.support{background-position:2px -2200px;}.colourkey{background-position:0 -2250px;}.i481{background-position:2px -2300px;}.help{background-position:2px -2350px;}.info{background-position:2px -2400px;}.clickable{cursor:pointer;width:18px;float:left;vertical-align:baseline;}.tfi{background-image:url('../Images/icons/16x16_files.png');background-repeat:no-repeat;text-indent:19px;background-position:2px 0;display:block;height:16px;}.accdb{background-position:2px -50px;}.mdb{background-position:2px -100px;}.xls{background-position:2px -150px;}.csv{background-position:2px -200px;}.xlsx{background-position:2px -250px;}.txt{background-position:2px -300px;}.rdl{background-position:2px -350px;}.xml{background-position:2px -400px;}.crpt{background-position:2px -450px;}.createFolder{background-position:2px -500px;}.editFolder{background-position:2px -550px;}.deleteFolder{background-position:2px -600px;}.renameFile{background-position:2px -650px;}.deleteFile{background-position:2px -700px;}.comboBox{float:left!important;border:1px solid #7f9db9;background-color:white;padding-left:2px;}.comboBoxDisabled{border:1px solid #A6A7AA!important;background-color:#ece9d8;}.comboBoxDisabled *{background-color:#ece9d8;color:grey;}.comboDropDown{border:1px solid #868686;background:#fefdf9 url('../Images/backgrounds.png') repeat-x 0 -3100px;cursor:default;z-index:90000;white-space:nowrap;margin-top:1px;}.comboDropDown .loadingMessage,.SystemSearchDropDown .loadingMessage{padding:10px;background:#fefdf9 url('../Images/backgrounds.png') repeat-x 0 -3100px;border-right:1px solid #868686;border-bottom:1px solid #868686;}.comboTextBox{background-color:Transparent;border:0;padding:2px 1px;margin-left:-2px;height:14px;}.comboItem{padding:2px 2px 1px 4px;border-bottom:1px solid #e9e8e5;height:13px;white-space:nowrap;}.comboItemHover{background-color:#f9f5df;color:#000;border:1px solid #dbce99;padding:1px 1px 1px 3px;}.comboItemSelected{background-color:#c1d2ee;color:#000;border:1px solid #316ac5;padding:1px 1px 1px 3px;}.comboHeaderRow{display:block;font-family:Verdana;font-size:11px;padding:4px;font-weight:bold;background:#ffebb5 url('../Images/backgrounds.png') repeat-x 0 -2900px;height:12px;border-bottom:1px solid #DBCE99;white-space:nowrap;}.comboHeaderRow div,.comboItem div{float:left;overflow:hidden;}.comboTextBoxWaterMark{color:#AAA!important;}.comboBox>table>tbody>tr td>img,.comboBox>table>tbody>tr td>img{height:18px;}.SystemSearchDropDown{border:1px solid #868686;cursor:default;background:#FFF;}DIV.SystemSearchComboBox{margin-left:4px;}.SystemSearchDropDown div{overflow:hidden!important;}.SystemSearchComboBox INPUT{border-top:1px solid #a6a7aa;border-left:1px solid #a6a7aa;border-bottom:1px solid #a6a7aa;background:white url('../Images/general-24.png') no-repeat 0 -100px!important;margin:2px 0 0 0;font-size:16px;font-weight:bold;padding:0;padding-left:3px!important;font-family:Verdana;color:#002b82;height:20px;}.SystemSearch{font-size:10px;height:36px;padding:0;margin:0;}.SystemSearchItem{background:#FFF url('../Images/combo/sub_menu.gif') no-repeat 290px 10px;height:36px;}.SystemSearchItemHover{background:#f9f5df url('../Images/combo/sub_menu.gif') no-repeat 289px -42px;}.SystemSearchItemSelected{background:#c1d2ee url('../Images/combo/sub_menu.gif') no-repeat 289px -92px;}.SystemSearch .objName{display:block;padding:0 0 3px 0;margin:0;color:#002b82;font-weight:bold;white-space:nowrap;width:280px;overflow:hidden;text-overflow:ellipsis;}.SystemSearch .objDesc{display:block;margin:0;padding:0;color:#888;white-space:nowrap;width:280px;overflow:hidden;text-overflow:ellipsis;}.SystemSearch_Loading{padding:10px;font-size:11px;text-align:center;}.SystemSearch_SubMenu_Item{color:#002b82;height:18px;vertical-align:middle;}.SystemSearch_SubMenu_Item DIV{height:100%;} .calendarBox{border:1px solid #7f9db9;float:left;overflow:hidden;background-color:white;height:18px;text-indent:0;padding-right:2px;}.calendarBox INPUT{display:inline;border:none;background-color:transparent;padding:2px 1px;height:14px;margin:0;width:100%;}.Minimal .calendarBox{background-image:none;height:18px;}.Minimal .calendarBox input{height:18px;margin:0!important;}#updAddGadget{display:none;}.moduleFrame{background:#FFF url(../Images/gadget_bottom.png) repeat-x left bottom;border:1px solid #acb4bc;margin:0 10px 8px 0;overflow:hidden;}.moduleHeader .toolbar{background:#FFF url(../Images/backgrounds.png) repeat-x left -3500px;float:right;padding-right:3px;padding-left:5px;font-weight:normal;height:16px;}.moduleHeader span{display:block;overflow:hidden;height:16px;}.moduleFrame A{cursor:pointer;}.moduleHeader .collapser{display:block;float:left;width:18px;height:16px;margin-right:5px;cursor:pointer;}.moduleHeader{background:#FFF url(../Images/backgrounds.png) repeat-x left -3500px;cursor:move;line-height:17px;width:100%;margin:0;padding-bottom:2px;height:16px;}.moduleHeader span{font-weight:bold;}.moduleContent{position:relative;overflow:hidden;padding:3px 6px 6px 6px;}.moduleContent>span{width:1px;}.moduleHeader .toolbar A{float:left;}.moduleHeader .toolbar .dashMenu{float:left;}.moduleHeader .toolbar .close,.moduleHeader .toolbar .dashMenu>li{width:18px;}.moduleFrame .preferenceDisplay{border-top:1px solid #486192;border-bottom:1px solid #486192;background-color:#eaf0f7;padding:5px;margin-top:3px;}.moduleFrame .preferenceDisplay LABEL,.moduleFrame .preferenceDisplay INPUT{margin:3px 10px 0 0;}.dashboardTabs{margin-top:63px;clear:both;padding-left:10px;height:25px;}.dashboardTabs a{display:block;float:left;color:#fff;text-decoration:none;margin-right:2px;background:#65A4E4 url(../Images/backgrounds.png) repeat-x left -3473px;border-right:1px solid #002B82;border-left:1px solid #bbd9f9;margin-top:4px;cursor:pointer;}.dashboardTabs .selected{background:#fff url(../Images/backgrounds.png) repeat-x left -3446px;border-bottom:1px solid #fff;border-left:1px solid #002B82;margin-bottom:-1px;font-weight:bold;color:#002B82;margin-top:0;cursor:default;}.dashboardTabs .selected input{display:block;font-weight:normal;padding:0;margin:-2px 0 0 -2px;height:12px;}.dashboardTabs .selected span{display:block;padding:6px 3px 6px 7px;white-space:nowrap;}.dashboardTabs a span{display:block;padding:4px 5px 4px 5px;float:left;}.dashboardTabs .selected .ti{display:block;float:left;margin-top:6px;cursor:pointer;}.dashboardTabs a .ti{display:none;}.dashboardBodyLink{width:100%;clear:both;background:transparent url(../Images/backgrounds.png) repeat-x left -3437px;height:5px;overflow:hidden;}.dashboardOptions{width:100%;border-top:1px solid #002B82;background:#FFF;}.dashboardOptionsInner{background:#FFF;height:60px;}.dashboardTabs .newDashboard{color:#002b82;text-decoration:none;background:transparent;margin:8px 0 0 5px;border:none;}.dashboardOption{margin:5px 20px 0 10px;text-align:center;float:left;}.dashboardOption h1{font-weight:bold;border-bottom:1px solid #002B82;font-size:11px;padding-bottom:1px;margin:0;}.dashboardOption .buttonHolder{display:table;margin:auto;padding:5px 0 5px 0;}.dashboardOption .miniButton{display:table-cell;color:#002b82;text-decoration:none;height:22px;vertical-align:middle;cursor:pointer;background-repeat:repeat-x;background:url(../Images/general-24.png) no-repeat right -200px;width:100%;}.dashboardOption .miniButton div{background:url(../Images/general-24.png) no-repeat left -200px;display:block;height:19px;padding:3px 0 0 5px;vertical-align:middle;margin-right:5px;text-align:center;}.dashboardOption .miniButton:hover{background:url(../Images/general-24.png) no-repeat right -250px;}.dashboardOption .miniButton:hover div{background:url(../Images/general-24.png) no-repeat left -250px;}.dashboardPlaceHolder{background:transparent!important;border:1px dotted #002b82;border-bottom:none;}.gadgetPlaceHolder{border:1px dotted #002b82;background:#9fbaf1;z-index:1!important;}.dropZone{min-height:400px;height:auto!important;height:400px;}.hiddenTarget{visibility:hidden;height:10px;}.ds_dlg_dlg{width:400px;}.ds_dv td.ch{color:#FFF;background-color:#4C6386;text-align:left;vertical-align:middle;border-style:solid;border-color:#FFF;font-family:Tahoma;font-size:8pt;font-weight:normal;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;border-width:1px;}.ds_dv th.rh{color:#FFF;background-color:#7893BE;text-align:left;border-style:solid;border-color:#FFF;font-family:Tahoma;font-size:8pt;font-weight:normal;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;border-width:1px;}.ds_dv td.rda{color:#26487B;background-color:#FFF;text-align:right;border-style:solid;border-color:#B1BBC9;font-family:Tahoma;font-size:8pt;font-weight:normal;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;border-width:1px;}.ds_dv td.ida{color:#26487B;background-color:#DAE2ED;text-align:right;border-style:solid;border-color:#B1BBC9;font-family:Tahoma;font-size:8pt;font-weight:normal;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;border-width:1px;}.ds_dv td.t,.ds_dv th.t{color:#00304F;background-color:#FFF;text-align:right;border-style:solid;border-color:#B1BBC9;font-family:Tahoma;font-size:8pt;font-weight:bold;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;border-width:1px;}.ds_dv div.ds_title{color:#808080;text-align:center;border-style:none;font-family:Tahoma;font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;padding:2px 1px 2px 1px;}.ds_dv td.emptycell{background-color:white;}ul.dashMenu{margin:0;padding:0;list-style-type:none;}ul.dashMenu ul{background-color:white;display:none;border:1px solid #acb4bc;}ul.dashMenu li{float:left;}ul.dashMenu ul{position:absolute;display:none;list-style-type:none;margin:0!important;padding:0!important;z-index:10000;left:0;top:0;}ul.dashMenu ul li{float:none;margin:0;white-space:nowrap;padding:2px;height:18px;}ul.dashMenu ul li.jd_menu_hover{background:url(../Images/general-24.png) no-repeat -4px -200px;}.moduleFrame .toolbar .newWindow{margin:2px 3px 0 5px;}.ui-resizable-e{width:3px;height:100px;float:right;background:lightgrey;cursor:e-resize;margin-right:4px;}.columnResizeHelper{margin-left:-5px;border-right:5px solid;height:100%!important;}.columnResizeShow{background:#9e9e9e;}.dashboardMessage{background:url(../Images/backgrounds.png) repeat scroll 0 0;height:15px;padding:5px;margin-top:-5px;border-bottom:1px solid #e8ba85;}.objinv .permid{background:#FFF url(../Images/backgrounds.png) repeat-x 0 2px;font-weight:bold;}.objinv .permid .browseLink{width:50px;float:left;margin:1px 0 1px 5px;}.objinv .permid .ti.i457{margin:4px 0 0 0;float:left;height:16px;text-indent:23px;vertical-align:middle;}.objinv .vendor td{border-bottom:none;}.objinv .vendor{background:#F9F6E6 url(../Images/backgrounds.png) repeat-x 0 -3036px;height:20px;font-weight:bold;}.objinv .service,.objinv .vendortotal{background:#FFF;}.objinv .vendortotal td{font-weight:bold;text-align:right;}.objinv .vendortotal td.cost{text-align:left;}.objinv .grandtotal{background:#002B82;font-weight:bold;}.objinv .grandtotal td{color:#FFF;text-align:right;}.objinv .grandtotal td.cost{text-align:left;}.objinv .cost{text-align:left;color:blue;}.objinv td,.objinv th{border-bottom:1px solid #C3C3C3;height:16px;}.objinv .header{background:#F4F0DD url(../Images/backgrounds.png) repeat-x 0 -2850px;height:23px;}.objinv .i3di{display:block;float:left;width:16px;height:16px;margin-left:5px;}.dvCompetitors{position:absolute;border-top:2px solid lightgrey;border-left:2px solid lightgrey;border-bottom:2px solid #5c5c5c;border-right:2px solid #5c5c5c;background:#FFF url('../Images/backgrounds.png') repeat-x 0 -50px;padding:5px;white-space:nowrap;overflow:hidden;z-index:1000;}.objinv td.ti{white-space:nowrap;overflow:hidden;}.InvoiceLastDetailRow td{border-bottom:1px solid black!important;}.InvoiceTotalRow td{font-weight:bold;border-top:1px solid black!important;}tr.hasduplicates>td:first-child{background-color:#f9cdcd;}tr.haspermissions>td:first-child{background-color:#e1ffd0;}tr.userleft>td{color:#af0119;font-style:italic;font-weight:bold;}tr.futurepricing>td{background-color:#e9eaeb;color:#525252;}tr.cancelled>td{color:#a7a6a6;text-decoration:line-through;}tr.urgen>td:first-child{background-color:#fffeb9;}tr.critical>td:first-child{background-color:#f9cdcd;}tr.inuse>td:first-child{background-color:#94b1db;}tr.ondelivery>td:first-child{background-color:#e8ba85;}td.isFoc{background-color:#e1ffd0;}td.inactive{color:#c1c1c1;}td.active{background-color:#94b1db;}td.cancelled{background-color:#f9cdcd;}.fileOpen{width:700px;}.fileOpen .header{background:#F9F6E6 url(../Images/backgrounds.png) repeat-x scroll 0 -3025px;padding:6px 0 4px 5px;overflow:hidden;height:20px;font-weight:bold;font-size:14px;}.fileOpen .path{padding:4px;}.fileOpen .title{padding:2px 5px 2px 5px;border-bottom:1px solid #abb3bb;border-top:1px solid #abb3bb;background:#eff4fa;}.fileOpen .folders{background:#FFF url(../Images/backgrounds.png) repeat-x scroll 0 -50px;border-right:1px solid #abb3bb;padding-top:5px;height:365px;float:left;width:199px;overflow:auto;}.fileOpen .files{background:#FFF url(../Images/backgrounds.png) repeat-x scroll 0 -50px;padding:5px;float:left;width:490px;height:360px;overflow:auto;clear:right;}.fileOpen .footer{border-top:1px solid #abb3bb;padding:5px;clear:both;}ul.editBtnsUL{list-style:none;display:inline;padding:0;margin:0;vertical-align:middle;}.editBtnsUL li{display:inline;}.editBtnsUL li a{width:17px;display:inline-block;}
Comment 1 u88484 2009-06-12 07:55:29 PDT
A reduced test case would be very helpful here.
Comment 2 David Baron :dbaron: ⌚️UTC-10 2009-06-15 12:15:35 PDT
Is the server sending any headers to inhibit caching?  (Even so, this probably shouldn't be happening, because the images should end up in the image cache...)
Comment 3 Giulio 2009-06-15 23:54:52 PDT
The headers for general-24.png are:

Cache-Control: public
Content-Type:image/png
Expires: Thu, 16 Jul 2009 06:51:12 GMT
Last-Modified: Fri, 22 May 2009 18:09:46 GMT
Accept-Ranges: bytes
Etag: "9556277d8dbc91:0"
Vary: Accept-Encoding, Accept-Language
Server: Microsoft-IIS/7.0
Date: Tue, 16 Jun 2009 06:51:13 GMT
Content-Length: 30242


As I said, this doesn't happen in FF3 (or IE), just 3.5 so I wouldn't expect these to be the cause.
Comment 4 u88484 2009-06-26 16:33:40 PDT
Giulio, any chance on you making an reduced test case so we can easily test this out.  Also, how do you test to know the file is download multiple times?
Comment 5 Marc des Garets 2009-07-01 07:13:09 PDT
This bug is huge!

It's firefox 3.5 only. Easy to reproduce, go on http://www.192.com for example or http://tenniscontact.com. You then check with firebug or tamper data the requests made and refresh the page (ctrl+f5). Images are downloaded as many times as they are called in the css.

For example, this image is used multiple times so downloaded 19 times:
http://www.192.com/assets/images/sprites/sprite-gradients.gif

The user ends up downloading 3.3Mb for the home page instead of 500kb making the page load incredibly slow and overloading the servers.

You can confirm this bug, I am surprised it hasn't been noticed in the release candidate... Please fix it as soon as possible...
Comment 6 u88484 2009-07-01 07:31:30 PDT
Marc could you make a reduced test case here?
Comment 7 Marc des Garets 2009-07-01 08:29:50 PDT
here it is:
<html>
<head></head>
<body>
<style type="text/css">
.mystyle1 {
background-image:url('pixel.gif');
background-repeat:no-repeat;
width:20px;
height:20px;
}
.mystyle2 {
background-image:url('pixel.gif');
background-repeat:no-repeat;
width:20px;
height:20px;
}
</style>

<div class="mystyle1"></div>
<div class="mystyle2"></div>
</body>
</html>

if you have a workaround before this gets fixed, don't hesitate to let me know.
Comment 8 Marc des Garets 2009-07-01 08:32:37 PDT
Forgot to say, that's on windows. Didn't try on other platform yet, I'll try this evening on mac os and linux and will let you know.
Comment 9 u88484 2009-07-01 09:18:56 PDT
Created attachment 386298 [details]
testcase
Comment 10 Nochum Sossonko [:Natch] 2009-07-01 09:25:57 PDT
There were some changes to the image cache in the late development stages, perhaps that would be a good place to start on a regression-range. Bug 496593. It hasn't landed on 191, not sure why, but maybe that's the cause? Does this happen on trunk?
Comment 11 Joe Drew (not getting mail) 2009-07-01 10:36:26 PDT
Yeah, if this doesn't happen on trunk, I highly suspect bug 496593 as a fix to this.
Comment 12 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 10:36:26 PDT
With the comment 9 testcase, I cannot reproduce the bug on either trunk or my 1.9.1 build.  Now my 1.9.1 build may not be quite what we shipped; it dates from 3 days ago.  But I doubt it has any differences in image cache behavior.
Comment 13 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 10:43:04 PDT
To be clear, but "cannot reproduce" I don't just mean "don't see multiple requests to the server" but also "don't see multiple calls to nsHttpChannel::AsyncOpen".  As in, I get image cache hits for all but the first load of the image on that testcase.

I just tried http://www.192.com (still with my 1.9.1 build) and I don't see multiple requests for any images.
Comment 14 David Baron :dbaron: ⌚️UTC-10 2009-07-01 10:48:02 PDT
Could this be caused by firebug or one of the other extensions people are using to verify that the problem is happening?
Comment 15 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 10:58:32 PDT
I should have mentioned: I did try also with Firebug installed (but not activated), and the problem also did not appear.  I'll try activating it and seeing what happens.
Comment 16 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 11:05:26 PDT
OK, in my 1.9.1 build, with the comment 9 testcase, with the net panel activated and open, I only get one request for the image.

Same thing on http://www.192.com.

I can reproduce the issue if I shift-reload, as expected: shift-reload bypasses all caches for every load.
Comment 17 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 11:17:25 PDT
I have just tried with the official Mac 3.5 release with Firebug 1.4.0b3 from addons.mozilla.org installed and the net panel open.  I cannot reproduce this bug on <http://www.192.com/>.

The steps I followed:

1) Create a new profile.
2) Start the browser with that profile.
3) Install the abovementioned version of Firebug from addons.mozilla.org.
4) Restart to complete the install.
5) Load http://www.192.com
6) Click firebug icon in status bar
7) Click on net panel to enable it.
8) Hit Cmd-R on the keyboard to reload the page.
Comment 18 Marc des Garets 2009-07-01 11:39:52 PDT
you can check with the plugin "tamper data", I don't think it's related to the plugin. You can check on http://marc.ttux.net/temp2.html if you want a more lightweight test. If you do a ctrl + f5 on the page you will see pixel.gif is being downloaded twice. I have just tried on linux, same thing.
Comment 19 Marc des Garets 2009-07-01 11:43:16 PDT
As you are on mac OS, pressing Cmd-R is not going to clear your images cache. This problem happens at the first visit of the website when no images are cached.
Comment 20 Marc des Garets 2009-07-01 11:46:21 PDT
Or no bug on Mac OS version?
Comment 21 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 12:01:31 PDT
> As you are on mac OS, pressing Cmd-R is not going to clear your images cache.

Neither does ctrl+f5 on Windows.  The two have identical behavior last I checked.
Comment 22 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 12:06:07 PDT
OK, I was wrong.  ctrl+f5 is identical to cmd+shift+R.  Which is a "force cache bypass" reload, which _should_ in fact bypass cache for subresources last I checked... Let me do some more testing.
Comment 23 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 12:20:50 PDT
OK.  1.9.0 behavior on http://marc.ttux.net/temp2.html

Initial load: one load of pixel.gif
cmd+r: same as initial load
cmd+shift+r: same as initial load

1.9.1 behavior on http://marc.ttux.net/temp2.html

Initial load: one load of pixel.gif
cmd+r: same as initial load
cmd+shift+r: two loads of pixel.gif

So it looks like there is in fact a change of behavior, but only when doing a bypass-cache reload, not on initial load of the page.  The "initial loads" here were performed on a clean profile.

Is anyone actually seeing the problem on initial site load?  Comment 19 implies so, but Marc earlier talked about ctrl+f5 as well....
Comment 24 Boris Zbarsky [:bz] (still a bit busy) 2009-07-01 12:41:11 PDT
OK, so the key difference between force-reload and reload is that the former passes the BYPASS_CACHE and BYPASS_PROXY flags to Reload().  These flags end up on the document request and hence on the loadgroup.  Then the image loader picks the flags up from the loadgroup, and does this:

1216   // If we're bypassing the cache, we are guaranteed to want a new cache entry,
1217   // since we're going to do a new load.
1218   if (requestFlags & nsIRequest::LOAD_BYPASS_CACHE) {
1219     RemoveFromCache(aURI);

The old image cache did this, but only when request->mLoadId != aCX, so it only doomed the entry once for a given document load instead of dooming it for every image.  So that seems like a definite regression from bug 430061.

I'd still like to know if this is an issue for any non-forced-reload loads, and if so how that can be reproduced, but as far as I can see the only issue here is for forced reloads.
Comment 25 Marc des Garets 2009-07-01 13:02:02 PDT
You are right, just checked, it actually doesn't happen on the first load of a page but only when you bypass the cache so it's not as bad as I thought.
Comment 26 Andrew Johnson 2009-07-02 16:33:10 PDT
*** Bug 501853 has been marked as a duplicate of this bug. ***
Comment 27 u88484 2009-07-03 17:26:57 PDT
*** Bug 502195 has been marked as a duplicate of this bug. ***
Comment 28 Matthias Versen [:Matti] 2009-07-04 04:33:30 PDT
*** Bug 502209 has been marked as a duplicate of this bug. ***
Comment 29 David Schneider 2009-07-04 04:42:25 PDT
I raised 502195. I'd like to point out that this issue is mislabeled as it does not only occur with css background images. I created a small test case similar to the following:

<html>
<body>
<img src="images/icon.gif">
<img src="images/icon.gif">
<img src="images/icon.gif">
<img src="images/icon.gif">
<img src="images/icon.gif">
</body>
</html>

and confirmed multiple requests on force-reload by observing my server access log. I can confirm that the issue only occurs on force-reload. This was verified by at least two people in my office (myself included).
Comment 30 u88484 2009-07-06 09:34:39 PDT
*** Bug 502517 has been marked as a duplicate of this bug. ***
Comment 31 u88484 2009-07-06 09:53:45 PDT
*** Bug 502556 has been marked as a duplicate of this bug. ***
Comment 32 Samuel Sidler (old account; do not CC) 2009-07-13 02:44:36 PDT
(In reply to comment #11)
> Yeah, if this doesn't happen on trunk, I highly suspect bug 496593 as a fix to
> this.

Joe: Can you confirm this? (And add a dependency if so.)
Comment 33 Joe Drew (not getting mail) 2009-07-13 10:37:14 PDT
No, as Boris pointed out in comment 24, this has nothing to do with bug 496593.
Comment 34 Joe Drew (not getting mail) 2009-07-17 19:34:49 PDT
*** Bug 504448 has been marked as a duplicate of this bug. ***
Comment 35 herrnoel 2009-07-22 14:42:30 PDT
I discovered this bug when observing that js preloaded mouseover image swaps were loading fully from the server with every mouseover event but only when using force-reload.  This is FF 3.5.1 -- only tested Windows XP.

This is killer on a web server if using fast polling ajax apps.  For example, I have a real-time 'dashboard' app that polls the server every second for data changes, merely receiving some simple JSON data.  But each row of data renders a row with no less than 4 images. On average there are a few rows but could be as high as 50.  We're talking 40-200+ unchanged image requests being pulled from the webserver every second.  Ouch.  Fortunately, most users aren't going to force-reload this page.

You can easily repeat these findings on any website that uses mouseover image swaps where the images are large enough to notice the download.  A large sprite would be particularly painful...
Comment 36 Oliver Schoett 2009-07-23 03:54:18 PDT
I can see the problem on www.192.com when reloading with Shift-F5.  However, there is a problem in the headers sent by that website; for example on the sprite

   http://statics.192.com/images/sprites/sprite-content-images.jpg

	Expires: Wed, 12 Aug 2009 10:43:20 GMT
	Cache-Control: max-age=1728000
	Content-Type: image/jpeg
	Accept-Ranges: bytes
	ETag: "-521329140"
	Last-Modified: Thu, 02 Jul 2009 12:30:47 GMT
	Content-Length: 275976
	Date: Thu, 23 Jul 2009 10:43:20 GMT

We have Expires = Date, which for HTTP/1.0 clients means that the response must not be cached (RFC1945, Sect. 10.7).  HTTP/1.1 clients should give precedence to the Cache-Control header, which says that the response may be cached.

I have seen this problem disappear on our own web site once the Expires: date is changed to some time in the future.

Nevertheless, it is a common problem, as Squid caches <= Version 2.6 do not update the Expires: header and thus deliver header values in the past (http://www.squid-cache.org/bugs/show_bug.cgi?id=7)
Comment 37 WADA 2009-07-23 22:39:09 PDT
*** Bug 387078 has been marked as a duplicate of this bug. ***
Comment 38 Matthias Versen [:Matti] 2009-08-03 03:37:37 PDT
*** Bug 507914 has been marked as a duplicate of this bug. ***
Comment 39 Matthias Versen [:Matti] 2009-08-05 08:29:25 PDT
*** Bug 508536 has been marked as a duplicate of this bug. ***
Comment 40 Boris Zbarsky [:bz] (still a bit busy) 2009-09-03 08:12:56 PDT
We really need to fix this.  Joe?
Comment 41 Joe Drew (not getting mail) 2009-09-03 21:04:11 PDT
Created attachment 398566 [details] [diff] [review]
fix

Don't unconditionally remove from the cache if we're bypassing from the cache. Instead, remove it once, when we create the new request, and use the context to allow other load requests through.
Comment 42 Joe Drew (not getting mail) 2009-09-03 21:06:51 PDT
Created attachment 398570 [details] [diff] [review]
tests (in progress)

This is an in-progress test for this bug. It fails intermittently right now because of another bug that I discovered in creating the test case. (Seems like finding bugs in imagelib is like finding hay in a haystack.)
Comment 43 Boris Zbarsky [:bz] (still a bit busy) 2009-09-04 13:39:21 PDT
Comment on attachment 398566 [details] [diff] [review]
fix

>+++ b/modules/libpr0n/src/imgLoader.cpp
>@@ -1330,19 +1335,19 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIUR
>+#if defined(PR_LOGGING)

No need for that #if, right?

This would have been really nice as a diff -w. ;)

r=bzbarsky
Comment 44 Stas 2009-09-11 02:45:59 PDT
*** Bug 515629 has been marked as a duplicate of this bug. ***
Comment 45 Bobby Holley (:bholley) (busy with Stylo) 2009-09-13 21:58:12 PDT
I'm not quite up to speed with image cache stuff (the documentation I requested on bug 514605 would probably help). I'll get around to going through it eventually, but for the next few weeks I'll probably be busy with decode-on-draw stuff. Ping me when you're looking to land this, and if I'm not free, feel free to cancel my review - bz's should be enough.
Comment 46 John Simons 2009-09-16 15:43:52 PDT
I've noticed that using 

img = new Image(); img.src = "whatever.gif"

No longer seems to insert into the memory image cache, in FF3.5. This of course breaks all image preloading routines. Is that related to this issue?
Comment 47 David Baron :dbaron: ⌚️UTC-10 2009-09-16 15:53:56 PDT
(In reply to comment #46)
> I've noticed that using 
> 
> img = new Image(); img.src = "whatever.gif"
> 
> No longer seems to insert into the memory image cache, in FF3.5. This of course
> breaks all image preloading routines. Is that related to this issue?

I don't think it's related.  Perhaps it's worth filing a separate bug report?

(Was that all the code you used, or did you hold on to the image object that you created until after the image actually loaded?  Might the problem have been that that new image object was garbage-collected before the image loaded?)
Comment 48 John Simons 2009-09-16 16:29:05 PDT
Created attachment 401128 [details]
Test case demonstrating broken image preloading

Open the net tab of Firebug and try rolling over these two links in FF3 and FF3.5. You'll see FF3.5 repeatedly re-loads the images.
Comment 49 John Simons 2009-09-16 16:30:17 PDT
dbaron -- I uploaded a test case. If anyone knows if this is a separate issue from this bug number, and has the other one, I'll upload the test case there.

Thanks!
Comment 50 Joe Drew (not getting mail) 2009-09-16 17:16:22 PDT
John,

If you change the for loop to

    for (var i = 0; i < 2; ++i)

(note the < 2), I've found that the preloading works. However, Firefox will continuously redownload the images if you Shift+Reload first, which is solved by this bug.
Comment 51 nevelis 2009-09-23 17:05:48 PDT
Still a problem for me - I won't use FF3.5 until this is fixed, because its just too slow.

In my case it's affecting me because I have multiple references in a CSS block to the same URL.  Once the image is downloaded, FF redownloads the same image as many times as there are references to it.
Comment 52 Ed Robinson 2009-09-24 02:48:13 PDT
This bug really affects FF 3.5 performance. I've reverted to FF 3.0. Needs to be fixed ASAP
Comment 53 Joe Drew (not getting mail) 2009-09-24 05:32:57 PDT
Wow, people are just shift+reloading all the time, eh?

This bug has a fix; it's just waiting on review. Please stop commenting unless you have something substantive to say.
Comment 54 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2009-09-24 10:33:56 PDT
*** Bug 518579 has been marked as a duplicate of this bug. ***
Comment 55 Bobby Holley (:bholley) (busy with Stylo) 2009-09-24 12:02:00 PDT
nevelis, Ed - Are you really shift-reloading that often, or are you thinking of a different bug?

Joe - note my earlier comment about the review.
Comment 56 Samuel Sidler (old account; do not CC) 2009-10-07 16:36:04 PDT
Joe: I think we should be looking to land this soon. Do we need Bobby's review here, per his comment 45?
Comment 57 Joe Drew (not getting mail) 2009-10-27 15:15:01 PDT
Yes, this needs to wait for Bobby's review. I've finally responded to him in bug 514605; hopefully he can get to these reviews now :)
Comment 58 Joe Drew (not getting mail) 2009-11-03 11:06:44 PST
Pre-emptive status update: Bobby has mentioned he will be able to look at this no earlier than Friday, November 6th.
Comment 59 Samuel Sidler (old account; do not CC) 2009-11-04 17:38:30 PST
You read my mind. But that means this won't make 1.9.1.6 since it won't have time to bake before code freeze. Sadly, pushing out to 1.9.1.7.
Comment 60 Jeff Muizelaar [:jrmuizel] 2009-11-11 08:57:59 PST
Comment on attachment 398566 [details] [diff] [review]
fix

>+    }
>+    else {
>+      if (requestFlags & nsIRequest::LOAD_BYPASS_CACHE)
>+        RemoveFromCache(entry);
>+      entry = nsnull;

It's not clear to me why this hunk is needed...
Comment 61 Joe Drew (not getting mail) 2009-11-11 15:34:27 PST
Created attachment 411818 [details] [diff] [review]
Review-related fixes

Removed the RemoveFromCache(), which is unnecessary, and add an explanatory comment.
Comment 62 Joe Drew (not getting mail) 2009-11-11 15:36:31 PST
Created attachment 411819 [details] [diff] [review]
mochitests

I added a soft reload testcase as well, to better test bug 514605. (Before, it would intermittently fail without bug 514605's patch - generally, only when doing a manual reload. Now both these bugs have complete tests.)
Comment 63 Joe Drew (not getting mail) 2009-11-12 15:08:12 PST
http://hg.mozilla.org/mozilla-central/rev/87efe5a32ea0 and http://hg.mozilla.org/mozilla-central/rev/2d854f2c85f6

To forestall the questions that will inevitably follow: this is currently checked in only to Firefox 3.7a1pre builds. It will follow into 3.6 beta builds and 3.5 release builds once it's proven ready.
Comment 65 Matthias Versen [:Matti] 2009-11-27 17:26:09 PST
*** Bug 531441 has been marked as a duplicate of this bug. ***
Comment 66 Daniel Veditz [:dveditz] 2009-12-02 15:31:10 PST
Comment on attachment 411818 [details] [diff] [review]
Review-related fixes

Approved for 1.9.1.7, a=dveditz for release-drivers
Comment 67 Terje Rosenlund 2009-12-08 05:06:30 PST
*** Bug 533443 has been marked as a duplicate of this bug. ***
Comment 68 Mike Beltzner [:beltzner, not reading bugmail] 2010-01-26 10:47:26 PST
JOE PLEASE TO BE LANDING WITH THE NOWZ
Comment 69 Joe Drew (not getting mail) 2010-01-26 11:05:02 PST
Created attachment 423569 [details] [diff] [review]
merge to 1.9.1
Comment 70 Jeff Muizelaar [:jrmuizel] 2010-01-26 11:09:16 PST
Will this break stuff?
Comment 71 Joe Drew (not getting mail) 2010-01-26 11:37:25 PST
No, it fixes stuff. Also you reviewed this patch for 1.9.2 and m-c already. :)
Comment 72 Jeff Muizelaar [:jrmuizel] 2010-01-26 11:41:55 PST
(In reply to comment #71)
> No, it fixes stuff. Also you reviewed this patch for 1.9.2 and m-c already. :)

Right, but the code around the changes is different in the 1.9.1 patch than it is in the 1.9.2/m-c patch
Comment 73 Jeff Muizelaar [:jrmuizel] 2010-01-26 14:15:59 PST
Comment on attachment 423569 [details] [diff] [review]
merge to 1.9.1

The patch is the same as before (ignoring context) and Joe promises me that it won't break anything.
Comment 74 Joe Drew (not getting mail) 2010-01-26 14:25:59 PST
Comment on attachment 423569 [details] [diff] [review]
merge to 1.9.1

The previous patch has approval1.9.1.8+, but doesn't apply cleanly to mozilla-1.9.1. This patch does.
Comment 75 Mike Beltzner [:beltzner, not reading bugmail] 2010-01-26 14:26:56 PST
Comment on attachment 423569 [details] [diff] [review]
merge to 1.9.1

booya=beltzner
Comment 76 Joe Drew (not getting mail) 2010-01-26 14:29:55 PST
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/9ac8f0124d32

The test, to pass reliably, requires bug 514605 to be fixed as well, but I didn't want to create too much code churn, so I didn't include the test (which IS on mozillas 1.9.2 and central).
Comment 77 j.j. 2010-05-08 10:04:13 PDT
*** Bug 504184 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.