musedata / musedata-website

Website frontend for musedata
https://www.musedata.org
0 stars 0 forks source link

Download spreadsheet data once per session #9

Closed craigsapp closed 4 years ago

craigsapp commented 4 years ago

Previous, the spreadsheet data was loaded every time a new page is opened on the website, or if the website is reloaded. Now the index is downloaded once and stored in sessionStorage.INDEX. This content is also visible from the INDEX variable in the console:

Screen Shot 2020-09-17 at 7 59 47 PM

If the spreadsheet is updated, then close all musedata.org tabs in the browser and then open the website again. This will cause the sessionStorage.INDEX to be deleted, forcing the index to be downloaded from the spreadsheet again.

This allows faster access to pages such as the parts page, and the list page.

Here is the raw JSON data that is downloaded once per session:

https://script.google.com/macros/s/AKfycbyIBWnniSSUHEDr10yRdMVx72sQDXXntyQ6bd0az2JpumBulp4/exec