简体   繁体   中英

Caching images with backbone Model

I'm looking for a cache solution but I'm not sure what to do.

I have an url which is displaying an image, something like this http://www.louisetzeliemartin.org/medias/images/chat-1.jpg

The problem is that the image is heavy and slow to load. I'm fetching my model every 1min getting a new image url each time (real time data map).

What I want is that instead of just storing the image src and then load it normally i want to store the image itself so it's faster.

I hope it's clear. What should be the good approach for this ? Any specificity with backbone ?

thanks a lot

The browser should take care of caching resources automagically. If you have devtools open, you might have No Cache enabled and it's reloading every time for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM