We provide a map in the web page(just like the google map),when user zoom in/out,move the map,we need to make a request to the server to get some information , so the request event will be so frequent,it will slow down the speed of user’s acton,for example,when user move the map, he/she will notice it is not smooth enougth,so I wonder if there is some out -of -box sloution of client cache?
Share
I guess it depends how your Map is implemented. Is this images you want to cache? If they are the result of http requests, then if your content can be cached and has a suitable expiry time the browser cache will prevent duplicate requests for the same content.
Alternatively or as well as you could take advantage of HTML5 local storage, but if it’s image data you are caching you’ll have to convert it to base64 ascii, as the local storage only allows text data in as the value.