Single-page application display method and device, server, device and readable medium
A single-page application and display device technology, applied in the direction of program control devices, special data processing applications, instruments, etc., can solve the problem that single-page applications do not have the function of preloading, cannot be directly rendered and returned by the server, and single-page applications flash etc. to achieve the effect of reducing data transmission size, making full use of idle network resources, and smooth page switching
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0065] like figure 1 As shown, Embodiment 1 of the present invention provides a method for displaying a single-page application, which is applied in a client, and the method includes:
[0066] S110: Send a data request to the server, and the server extracts the corresponding business data in the front-end code data layer, and performs a page data request in the server intranet. The server intranet is a network composed of multiple servers including the server (the network can also be referred to as the server side). Since the server receiving the client request may not necessarily store corresponding complete data, it is necessary to Data requests are made in the server intranet.
[0067] When the user opens the browser and enters the single-page application, it needs to request the server to display the current webpage. So the client sends the data request to the server. After the server receives the request, it extracts the corresponding business data from the stored fron...
Embodiment 2
[0078] On the basis of Embodiment 1, this Embodiment 2 adds the data pre-recording function on the page, and the specific scheme is as follows:
[0079] like Figure 4 As shown, Embodiment 2 provides a single-page application display method, including:
[0080] S210: Send a data request to the server, and the server extracts the corresponding business data in the front-end code data layer, and performs a page data request in the server intranet.
[0081] S220: Receive the service data returned by the server and store it in the data pool.
[0082] S230: Receive and display the formed page obtained after rendering the page data by the Node side.
[0083] S240: Perform data preloading on links on the current page.
[0084] In the second embodiment, in order to further speed up the page display, a step of data preloading is added on the basis of the solution in the first embodiment, and the following only specifically describes this step in detail:
[0085] like Figure 5 As ...
Embodiment 3
[0095] In order to make reasonable use of local resources and avoid repeatedly obtaining data from the server in Embodiment 3, the third embodiment adds a step of judging and loading local resources on the basis of Embodiment 2. The specific technical solution is:
[0096] like Image 6 As shown, Embodiment 3 provides a single-page application display method, including:
[0097] S310: Determine whether the local cache has the required resource file, and if so, load it first; if not, execute the step S320.
[0098] S320: Send a data request to the server, and the server extracts corresponding business data in the data layer of the front-end code, and performs a page data request in the server intranet.
[0099] S330: Receive the service data returned by the server and store it in the data pool.
[0100] S340: Receive and display the formed page obtained after rendering the page data by the Node side.
[0101] S350: Perform data preloading on links on the current page.
[01...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com