Web front-end data local-storage and access method for based on local Storage

A data localization and data storage technology, applied in memory systems, electrical digital data processing, instruments, etc., can solve problems such as program performance degradation, inability to write, limited storage space, etc.

Inactive Publication Date: 2017-11-07
CENT SOUTH UNIV
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Experiments have shown that when the amount of data accessed is the same, the time it takes for localStorage to read a piece of large data is about 1ms, but the time it takes to read the same amount of small data multiple times is dozens of times that of reading a piece of large data. That is to say, using localStorage to read data frequently will lead to program performance degradation
In addition, since localStorage is permanent storage, the data usage period cannot be controlled, so an expiration mechanism needs ...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Web front-end data local-storage and access method for based on local Storage
  • Web front-end data local-storage and access method for based on local Storage
  • Web front-end data local-storage and access method for based on local Storage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0044] Main steps and principle of the present invention are:

[0045] 1 Divide the storage area

[0046] Website pages mainly include two parts: static resources and dynamic resources. Static resources are mainly resources such as JS, CSS, pictures and even HTML pages, while dynamic resources are mainly various data that interact with the background. The data that is suitable for localStorage caching mainly includes three types: (1) JS, CSS, HTML files and pictures, etc., which are suitable for storing this type of files that do not change frequently, and can be read directly from the cache when loading the page; (2) ) Cache public data, such as page titles, advertisements, etc.; (3) Cache data that is basically unchanged and read from the database. Files with large space, such as videos, tend to exceed the upper limit of storage ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Web front-end data local-storage and access method based on the local Storage. The method includes that 1, according to the data type, a storage region is divided into four regions, a novel data storage format is designed, and data is read from a memory object instead of a magnetic disk, so that the problem that the local Storage is low in efficiency of frequently reading data is solved; 2, when data is stored in the local Storage and exceeds the upper limit of storage space, errors occur, program termination is resulted, and program can not be written; in order to overcome the defects, an order array is added in each storage region, the key values of data are stored, based on the LRU algorithm and according to the data using time sequence, header data is marked as 'useless data', in two aspects of early-period prevention and later-period monitoring, a space full error handling mechanism is designed, and the 'useless data' is timely cleared away to make space for normal writing of data.

Description

technical field [0001] The invention relates to a method for locally storing and accessing web front-end data based on localStorage. Background technique [0002] With the advent of Web 2.0, the content of Web applications has changed, from the publishing-reading model to the user-relational model, and the requirements for page loading time are increasing. User experience and user evaluation have become the priority of the evaluation system. An important indicator of inferiority. Although some websites can now use server clusters to improve system performance, the cost is high and unaffordable. Under this situation, researchers have found another way, starting from the client browser, without increasing hardware costs. performance effect. [0003] With the development of the network and the development of front-end related technologies, new front-end architectures have emerged, and new development standards have been continuously improved. Some well-known Internet companie...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F12/0893G06F12/123
CPCG06F12/0893G06F12/123
Inventor 曾锋李精
Owner CENT SOUTH UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products