I am using HTML and javascript as a front-end and java as a backend and mysql for storing data. The database is updated every 24hrs and the results to be displayed is static as stored in mysql.
I don’t want to make any real time sql query as the number of queries is fixed. Instead I want to store the result from the database in some way so that it is accessible as a local variable to the javascript. I don’t want to make query because there are like 16 queries at present and can increase at times which needs to be done on load simultaneously to display the results of the complete page. This is going to consume memory, querying and processing the results will be slow as the number of users and queries increases.
So I was thinking of some local storage mechanism, which can be used to store the preprocessd data where from Javascript can directly access it without making any query. Is this possible and if so how? I want the data to last for atleast 24hrs before it is updated. Please help with any idea how to make it work
I stored the data after automatic query from
mysqlinjsonfile which can then be included as ascript tagin the html file. Thus all the results are available to the javascript as alocal variableand no real time query is required to be executed at all.