Hey Guys, Wix Team,
I have a file consisting of details of all the countries, states, calling code and currencies in json format. I am using it in lot of dropdowns in my website. So where is the best place to store this json file to maximize the site load speed?
Backend file : Load the Json file every time when the user visit the page
Backend + Session storage : load one time each day and store the file in local storage and then access the data everytime from local storage till next day
Page code : Use the json object in every page where I have the dropdowns
Page code + session storage : Use the json object in every page where I have the dropdowns and store the file in local storage the first time in a day and then access the data everytime from local storage till next day.
My plan is to use 2. is it a good design choice for optimizing the page speed?
Is there any other suggestions other than these? (There might be some situations where I need to add new countries or new infos in future. That is why I am planning to save the file in local storage each day and rewrite it on the next day in point 2 and 4)