May 22, 2020 Replies: 1 Straight to the point: Just add a random number after image path then browser will never use the cache for that image. Actually is a "new" image every time for the browser. B4X: page.CellR(1,1).AddComponent(ABMShared.BuildImage(page, "logoempresa","../uploads/logo.png" & "?" & DateTime.Now,1,"",187,106,False)) I've used DateTime.Now to generate the random number. Details: A page, from my ABMaterial application, allows the user upload an image that will be used as company logo. I've noticed that if image uploaded with same name (old image) browser will cache that file and even is a different image browser still use the cached image. I've found the workaround over here. As I'm not a html expert I took a while to understand what's going on and find a solution. Click to expand...
Straight to the point: Just add a random number after image path then browser will never use the cache for that image. Actually is a "new" image every time for the browser. B4X: page.CellR(1,1).AddComponent(ABMShared.BuildImage(page, "logoempresa","../uploads/logo.png" & "?" & DateTime.Now,1,"",187,106,False)) I've used DateTime.Now to generate the random number. Details: A page, from my ABMaterial application, allows the user upload an image that will be used as company logo. I've noticed that if image uploaded with same name (old image) browser will cache that file and even is a different image browser still use the cached image. I've found the workaround over here. As I'm not a html expert I took a while to understand what's going on and find a solution.
alwaysbusy Expert Licensed User Longtime User May 22, 2020 #2 This is the correct approach. ABM will (for speed) try to cache as much as possible and this is how you trick it to reload anyway.
This is the correct approach. ABM will (for speed) try to cache as much as possible and this is how you trick it to reload anyway.