0

In JavaScript, loading or modifying an image is quite easy. Now I want to setup a page, that is creating 100 images on the clientside (to eliminate a lot of traffic sent to the server). So my question now:

Is it possible to load a button without text (e.g. button.png), put text or something on it and cache it in each variant in the HTTP cache? So create label "button1" on it, cache it, create "button2" on it, cache it.

What other methods are there to get an any object into the cache (e.g. chrome://cache) using JavaScript? For example from string to cached object.

Best regards, mutilis

mutilis
  • 563
  • 3
  • 18
  • look like a duplicate question (https://stackoverflow.com/questions/3646036/javascript-preloading-images). My response to images being cached is a double edged sword where you will have to do server maintenance on your application pool more often than javascript. Curious what others suggest! HTH –  Feb 12 '18 at 15:59
  • @Programmer you just want to preload them, I want to generate them on the client (without server connection). So e.g. load "generic.jpg", and create "generic_label_a.jpg", "generic_label_b.jpg" etc on the client and put them in the cache, so once the HTML would want to show them, it's cached prehand. Do you see the difference? :-) – mutilis Feb 13 '18 at 08:28

0 Answers0