I am retrieving data from a web service that includes images using HTTPRequest within Onsen UI.
I believe it’s best practise to try to bring the server images into the user’s device to save having to load the image from the server each time the page is displayed (especially for comment avatar files etc).
I’ve looked at PWA processes but I don’t intend for the app to be used offline and examples just refer to known JS, CSS, HTML files.
The method I’m considering is to be given the filename via the API, check if the file is saved locally and use it if found, if not then copy the file from the server to the device first before using it.
What is the most efficient (or best practise) solution to achieving this?
Thanks.