Manikandan Thangaraj
Manikandan Thangaraj

Reputation: 1594

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,

Upvotes: 4

Views: 2064

Answers (1)

CertainPerformance
CertainPerformance

Reputation: 370699

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.

Upvotes: 4

Related Questions