Search code examples
enyoopenbravo

Loading image in cache using enyo.js


I need to load images of list of product in cache using enyo and then need to load it in front end (UI), which contains list of products, for mobile version of openbravo. I am new in this field, can anyone help me out in this.


Solution

  • There is nothing particularly special you need to do in Enyo to pre-cache the images. The main caveat is: In mobile, don't try to cache too many images. Use any standard JavaScript technique for pre-caching images. Here's one from StackOverflow:

    https://stackoverflow.com/a/6990691/506361

    Basically, when you get your response back with the list of items, add the code to iterate over your array/Collection and create the throw-away Img elements.