Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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,

like image 560
Manikandan Thangaraj Avatar asked Sep 18 '25 04:09

Manikandan Thangaraj


1 Answers

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.

like image 116
CertainPerformance Avatar answered Sep 20 '25 17:09

CertainPerformance