I have around 2mb of static data around 2000 records (let’s say product information) which rarely changed.
I need this data in most of my pages, what is the better way to load this data?
I can think of 3 ways
Saving data in collection
- Can’t waste db operations and memory, they are expensive
Save data in json object in client side
- I feel this will increase the size of bundle and will increase the loading time for initial users
- I feel this is the better way to do, can we serve json object using cdn?
Any one other approaches to do this? Is CDN the best option?