The invention discloses a browser local storage capacity expansion method and device for historical projects, and the method comprises the steps:
rewriting the original unloading function and reading function of
Web Storage, taking IndexedDB as an unloading capacity expansion space, and generating a
JavaScript script file; the method comprises the following steps of: introducing a
JavaScript script file into a Web target historical project; responding to a data storage request of the Web target historical project; and responding to a data reading request of the Web target historical project. According to the method, under the condition that an existing Web historical project is not reconstructed, the access work of
big data is realized by introducing the rewritten
JavaScript script file with the unloading function of the
Web Storage native, and the situation that a large
workload is needed due to the fact that all storage storage
modes in the project are directly reconstructed is effectively avoided; and meanwhile, by utilizing the compatibility of a local
database of the browser, under the condition that the local storage memory is insufficient, the target data to be stored can be transferred to the IndexedDB, so that the purpose of capacity expansion can be realized.