Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Image reloads in Tree using Chrome

    Hi there,
    we are currently using SmartClient_v91p_2014-05-07_Pro and found a bug in TreeGrids which only affects Chrome (tested with Version 34.0.1847.131 m)

    Code:
    isc.TreeGrid.create({
    	"selectionUpdated" : function (p1, p2) {
    		console.log("changed");
    	},
    	"width" : 240,
    	"height" : 300,
    	data : isc.Tree.create({
    		"openProperty" : "isOpen",
    		"root" : {
    			"title" : "Root",
    			"children" : [{
    					"title" : "Item 1",
    					"isOpen" : true,
    					"icon" : "https:\/\/d4ffs3jmylg0g.cloudfront.net\/HRworks\/images\/icons\/16\/alarmclock.png",
    					"children" : [{
    							"title" : "Item 2",
    							"icon" : "https:\/\/d4ffs3jmylg0g.cloudfront.net\/HRworks\/images\/icons\/16\/alarmclock.png",
    						}, {
    							"title" : "Item 3",
    							"icon" : "https:\/\/d4ffs3jmylg0g.cloudfront.net\/HRworks\/images\/icons\/16\/alarmclock.png",
    						}, {
    							"title" : "Item 4",
    							"icon" : "https:\/\/d4ffs3jmylg0g.cloudfront.net\/HRworks\/images\/icons\/16\/alarmclock.png",
    						}
    					]
    				}
    			]
    		}
    	})
    })
    If you copy this this snippet to: here and change the selection multiple times, you might see that the icons in the tree disappears for a short time. Watching the traffic, Chrome does actually reloads image.
    Firefox (29.0) and IE11 (11.0.9600.17105) do it correctly without reloading the images.

    Best Regards

    #2
    Your images should be setting HTTP Expires headers if you want to avoid repeated requests.

    The fact that you are experiencing this only for Chrome just means that Chrome's heuristics may differ in the absence of Expires headers, or perhaps your Chrome settings are non-standard.

    Either way, adding Expires headers is the solution.

    Comment


      #3
      thanks,
      before updating to Smartclient 9.1 the images could be set without expires. Therefore i thought it might be a smartclient-change. It's working.

      Best Regards

      Comment

      Working...
      X