简体   繁体   中英

How to handle large amount of data in browsers local storage on Angular 4?

I have developing one web app in Angular 4. That has returning the 50k+ records from API. With that I need to store that data in to local storage and handle offline once data return. I tried with localstoarge but localstoarge not storing all data. Because it have maximum limit 5MB and it will change based on browser. Suggestion any idea?

Thanks,

Use IndexedDB instead - it has a much greater size limit, and is perfectly suited for organizing large amounts of structured data. It's significantly more tricky to use than localStorage, but it's your only other option if you want to store data too large for localStorage.

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