CN110008429A - A kind of method for page jump and device, storage medium and terminal - Google Patents
A kind of method for page jump and device, storage medium and terminal Download PDFInfo
- Publication number
- CN110008429A CN110008429A CN201910281246.3A CN201910281246A CN110008429A CN 110008429 A CN110008429 A CN 110008429A CN 201910281246 A CN201910281246 A CN 201910281246A CN 110008429 A CN110008429 A CN 110008429A
- Authority
- CN
- China
- Prior art keywords
- page
- jump
- current
- routing iinformation
- current page
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000009191 jumping Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000686 essence Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/972—Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of method for page jump and devices, method includes: to obtain current page routing iinformation, judge whether current page routing iinformation is consistent with jump page presupposed information, jumps to the caching page from current page if current page routing iinformation is consistent with jump page presupposed information.Described device includes: first acquisition unit, for obtaining current page routing iinformation;Judging unit, for judging whether the current page routing iinformation and jump page presupposed information are consistent;If the current page routing iinformation is consistent with the jump page presupposed information, the caching page of jump page is shown.The method for page jump of the application can need to show the caching page according to actual use situation, when meeting from certain page jumps and not need the needs of showing caching two kinds of page jump situations of the page, raising page jump efficiency.
Description
Technical field
The present invention relates to network communication technology field, in particular to a kind of method for page jump and device, storage medium and
Terminal.
Background technique
It is frequently necessary to that page jump occurs during by net page browse information, has different jumps between the different pages
Turn situation.Page cache is that dynamic page is directly generated to the static page to be placed on server end, when user transfers same page,
Static page will be directly downloaded to client, it is no longer necessary to by the operation of program and the access of database, can save service
The load of device.In actual use it is possible that needing to show the caching page when certain page jumps are to certain pages, also have
It may not be needed to show the caching page.The existing mode for jumping to the caching page be using sessionStrage or
LocalStorage is stored data into sessionStorage or localStorage when the page leaves, then
The data that storage is read when secondary entrance are manually shown again.But this implementation method is very complicated, each page into
Enter and leave to require to store and read data and show.The mode of this jump page can not meet both the above simultaneously
The demand of page jump situation, jumps low efficiency.
Summary of the invention
This application provides a kind of method for page jump and devices, can not be simultaneously to solve existing method for page jump
The needs of showing the caching page is needed when meeting certain page jumps to certain pages, it is also possible to not need to show the caching page
Demand, the problem of jumping low efficiency.
In order to solve the above-mentioned technical problem first aspect present invention provides a kind of method for page jump, which comprises
Obtain current page routing iinformation;
Judge whether the current page routing iinformation and jump page presupposed information are consistent;
If the current page routing iinformation is consistent with the jump page presupposed information, the slow of jump page is shown
Deposit the page.
Preferably, the method for page jump further include:
If the current page routing iinformation and the jump page presupposed information are inconsistent, initial configuration, brush
New jump page.
Preferably, before there is information on the acquisition current page road further include:
Receive the jump instruction that jump page is jumped to from current page;
According to the jump instruction, the mark of the current page is obtained;
According to the mark of the current page, the current page road corresponding with the mark of the current page is obtained
By information.
Preferably, before there is information on the acquisition current page road further include:
Obtain page cache instruction;
It is instructed according to the page cache, caches the caching page of the jump page;
It is instructed according to the page cache, generates the jump page presupposed information.
Preferably, the current page routing iinformation includes the said path title of the current page.
Second aspect provides a kind of page skip device described device
First acquisition unit, for obtaining current page routing iinformation;
Judging unit, for judging whether the current page routing iinformation and jump page presupposed information are consistent;
If the current page routing iinformation is consistent with the jump page presupposed information, the slow of jump page is shown
Deposit the page.
Preferably, described device includes:
Receiving unit, for receiving the jump instruction for jumping to jump page from current page;
Second acquisition unit, for obtaining the mark of the current page according to the jump instruction;
Third acquiring unit obtains opposite with the mark of the current page for the mark according to the current page
The current page routing iinformation answered.
Preferably, described device further include:
4th acquiring unit, for obtaining page cache instruction;
Cache unit caches the caching page of the jump page for instructing according to the page cache;
Information generating unit generates the jump page presupposed information for instructing according to the page cache.
The third aspect provides a kind of storage medium, and the storage medium is stored with computer instruction, the computer instruction
It is performed the method for page jump for realizing application program as described in any one in claim 1-5.
Fourth aspect provides a kind of terminal, and the terminal includes processor and memory, is stored in the memory
Computer instruction;
In the application program launching, the processor reads the computer instruction and realizes such as claim 1-5
The method for page jump of described in any item application programs.
The application judges current page routing iinformation and jump page presupposed information by obtaining current page routing iinformation
It is whether consistent, caching page is jumped to from current page if current page routing iinformation is consistent with jump page presupposed information
Face.It can need to show the caching page according to actual use situation, when meeting from certain page jumps and not need to show caching
The demand of two kinds of page jump situations of the page improves page jump efficiency.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 provides the flow diagram of method for page jump for the embodiment of the present invention;
Fig. 2 is the logic diagram of method for page jump provided in an embodiment of the present invention;
Fig. 3 is the block diagram of page skip device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Whole description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, being a kind of flow chart of method for page jump provided by the embodiments of the present application, the method is applied to
Web browser is also possible to other APP with browsing function.The described method includes:
Step 101: obtaining current page routing iinformation.The present processes are based on Vue frame, it is necessary first to
Keep-alive component is configured in App.vue entry file, specific implementation code is as follows:
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
< router-view v-if="!$route.meta.keepAlive"></router-view>
Setting routing keepAlive attribute is true in router.js, and the standardmil page needs to cache, so
KeepAlive:true, the Vue page can judge whether current page needs to cache according to the value of keepAlive.router.js
It is the routing configuration file of Vue frame.It is as follows to implement code:
Wherein, the current page routing iinformation includes the said path title of the current page.Specifically,
BeforeEach is monitored in main.js, the routing iinformation of the page before record jumps.A upper routing address is stored in
In beforeRouter (convenient to use when next step monitors actived), the variable global as one is convenient to be entirely
It is read in system file.Main.js is the file for initializing the Vue page, is exactly the entry file of whole system.Implement code
It is as follows:
Step 102: judging whether the current page routing iinformation and jump page presupposed information are consistent, if described work as
Preceding page routing iinformation is consistent with the jump page presupposed information, then shows the caching page of jump page.Specifically,
Actived life cycle is monitored in the standardmil page, this page setup keepAlive is true, but user can
Only just cached when standardsample file jumps to this page with setting, read the upper page route whether be
Standardsample, if it is true, i.e. current page routing iinformation is consistent with the jump page presupposed information, then uses
It is data cached.Monitor actived (being provided with keepAlive:true, can only set out actived when entering the page second)
Life cycle.It is as follows to implement code:
The application judges current page routing iinformation and jump page presupposed information by obtaining current page routing iinformation
It is whether consistent, caching page is jumped to from current page if current page routing iinformation is consistent with jump page presupposed information
Face.It can need to show the caching page according to actual use situation, when meeting from certain page jumps and not need to show caching
The demand of two kinds of page jump situations of the page improves page jump efficiency.
The logic diagram that Fig. 2 is method for page jump provided in an embodiment of the present invention is please referred to, specifically, App.vue
Keep-alive component is configured in entry file, setting routing keepAlive attribute is true, and the standardmil page needs
Caching, by monitoring beforeEach in main.js, the routing iinformation of the page before record jumps.In the standardmil page
Middle monitoring actived life cycle, when A1 page switching is to the A page, judge the A1 page routing iinformation whether
Standardsample (jump page presupposed information) does not refresh the A page if it is yes, and displaying is data cached, if it is
No, then do not show it is data cached, can be with initial configuration, the manual refreshing A page.
In addition, the method for page jump further include: if the current page routing iinformation and the jump page are pre-
If information is inconsistent, then initial configuration, refreshes jump page.Specifically, equally being monitored in the standardmil page
Actived life cycle, this page setup keepAlive are true, but user can set and only exist
Standardsample file just caches when jumping to this page, read the routing of the upper page whether be
Standardsample, if it is false, i.e., the described current page routing iinformation and the jump page presupposed information are different
It causes, then initial configuration, refreshes jump page.
The caching of the page inherently may be implemented in keep-alive in Vue, only says under special circumstances, cannot be fine
The demand wanted of arrival user, do not need to cache for example, the A page enters the B page, and when B_1 page enters the B page need it is slow
Deposit, such case we it is simple cannot perfectly be supported very much using keep-alive, need to complete by other modes.
The caching that complex page is completed using keep-alive+beforeEach+actived, by caching page face in need
KeepAlive is both configured to true, monitors the routing title of a page on beforeEach logout in main.js,
When the business page (the A page) monitoring actived life cycle judges which page enters according to the business demand of oneself, the A page
It needing to cache, which does not need to cache, if the current page routing iinformation and the jump page presupposed information are inconsistent,
It then can refresh automatically jump page with initial configuration, manual refreshing can also be done.
It can also include: to receive from current page to jump to jump page that the acquisition current page road, which has before information,
Jump instruction, jump instruction can be the specified redirected link on user's click current page.According to the jump instruction, obtain
The mark of the current page obtains institute corresponding with the mark of the current page according to the mark of the current page
State current page routing iinformation.
It can also include: to obtain page cache instruction that the acquisition current page road, which has before information,;According to the page
Cache instruction caches the caching page of the jump page;It is instructed according to the page cache, it is default to generate the jump page
Information.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device
Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Described device includes:
First acquisition unit U1001, for obtaining current page routing iinformation;
Judging unit U1002, for judging whether the current page routing iinformation and jump page presupposed information are consistent;
If the current page routing iinformation is consistent with the jump page presupposed information, the slow of jump page is shown
Deposit the page.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
Optionally, in another embodiment, described device includes:
Receiving unit, for receiving the jump instruction for jumping to jump page from current page;
Second acquisition unit, for obtaining the mark of the current page according to the jump instruction;
Third acquiring unit obtains opposite with the mark of the current page for the mark according to the current page
The current page routing iinformation answered.
Optionally, in another embodiment, described device can also include:
4th acquiring unit, for obtaining page cache instruction;
Cache unit caches the caching page of the jump page for instructing according to the page cache;
Information generating unit generates the jump page presupposed information for instructing according to the page cache.
The application further relates to a kind of storage medium, and the storage medium is stored with computer instruction, the computer instruction
It is performed the method for page jump for realizing application program as noted in the discussion.The application further relates to a kind of terminal, described
Terminal includes processor and memory, is stored with computer instruction in the memory, in the application program launching,
The processor reads the computer instruction and realizes the method for page jump of application program as noted in the discussion.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.
Claims (10)
1. a kind of method for page jump, which is characterized in that the method for page jump includes:
Obtain current page routing iinformation;
Judge whether the current page routing iinformation and jump page presupposed information are consistent;
If the current page routing iinformation is consistent with the jump page presupposed information, the caching page of jump page is shown
Face.
2. method for page jump as described in claim 1, which is characterized in that the method for page jump further include:
If the current page routing iinformation and the jump page presupposed information are inconsistent, initial configuration, refresh and jump
Blade-rotating face.
3. method for page jump as described in claim 1, which is characterized in that the acquisition current page road has before information also
Include:
Receive the jump instruction that jump page is jumped to from current page;
According to the jump instruction, the mark of the current page is obtained;
According to the mark of the current page, the current page routing letter corresponding with the mark of the current page is obtained
Breath.
4. method for page jump as described in claim 1, which is characterized in that the acquisition current page road has before information also
Include:
Obtain page cache instruction;
It is instructed according to the page cache, caches the caching page of the jump page;
It is instructed according to the page cache, generates the jump page presupposed information.
5. method for page jump as described in claim 1, which is characterized in that the current page routing iinformation includes described works as
The said path title of the preceding page.
6. a kind of page skip device, which is characterized in that described device includes:
First acquisition unit, for obtaining current page routing iinformation;
Judging unit, for judging whether the current page routing iinformation and jump page presupposed information are consistent;
If the current page routing iinformation is consistent with the jump page presupposed information, the caching page of jump page is shown
Face.
7. page skip device as claimed in claim 6, which is characterized in that described device includes:
Receiving unit, for receiving the jump instruction for jumping to jump page from current page;
Second acquisition unit, for obtaining the mark of the current page according to the jump instruction;
Third acquiring unit obtains corresponding with the mark of the current page for the mark according to the current page
The current page routing iinformation.
8. page skip device as claimed in claim 6, which is characterized in that described device further include:
4th acquiring unit, for obtaining page cache instruction;
Cache unit caches the caching page of the jump page for instructing according to the page cache;
Information generating unit generates the jump page presupposed information for instructing according to the page cache.
9. a kind of storage medium, which is characterized in that the storage medium is stored with computer instruction, and the computer instruction is held
The method for page jump of application program as described in any one in claim 1-5 is realized when row.
10. a kind of terminal, which is characterized in that the terminal includes processor and memory, and meter is stored in the memory
The instruction of calculation machine;
In the application program launching, the processor reads the computer instruction and realizes as claim 1-5 is any
The method for page jump of application program described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910281246.3A CN110008429A (en) | 2019-04-09 | 2019-04-09 | A kind of method for page jump and device, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910281246.3A CN110008429A (en) | 2019-04-09 | 2019-04-09 | A kind of method for page jump and device, storage medium and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110008429A true CN110008429A (en) | 2019-07-12 |
Family
ID=67170631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910281246.3A Pending CN110008429A (en) | 2019-04-09 | 2019-04-09 | A kind of method for page jump and device, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110008429A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115395A (en) * | 2020-09-04 | 2020-12-22 | 上海悦易网络信息技术有限公司 | Method and equipment for realizing animation configuration during page routing jump |
CN112650549A (en) * | 2020-12-23 | 2021-04-13 | 平安普惠企业管理有限公司 | Page jump method, device, terminal and storage medium |
CN112685663A (en) * | 2020-12-21 | 2021-04-20 | 福建新大陆软件工程有限公司 | SPA multi-page label management method based on VUE |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2472585A (en) * | 2009-08-10 | 2011-02-16 | St Microelectronics | Method of compiling code for loading to cache memory |
CN103678536A (en) * | 2013-12-02 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and device for implementing page returning |
CN107402953A (en) * | 2017-05-22 | 2017-11-28 | 阿里巴巴集团控股有限公司 | A kind of method for page jump and device |
CN108255550A (en) * | 2017-11-27 | 2018-07-06 | 深圳市小牛在线互联网信息咨询有限公司 | Method for page jump, device, storage medium and computer equipment |
-
2019
- 2019-04-09 CN CN201910281246.3A patent/CN110008429A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2472585A (en) * | 2009-08-10 | 2011-02-16 | St Microelectronics | Method of compiling code for loading to cache memory |
CN103678536A (en) * | 2013-12-02 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Method and device for implementing page returning |
CN107402953A (en) * | 2017-05-22 | 2017-11-28 | 阿里巴巴集团控股有限公司 | A kind of method for page jump and device |
CN108255550A (en) * | 2017-11-27 | 2018-07-06 | 深圳市小牛在线互联网信息咨询有限公司 | Method for page jump, device, storage medium and computer equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115395A (en) * | 2020-09-04 | 2020-12-22 | 上海悦易网络信息技术有限公司 | Method and equipment for realizing animation configuration during page routing jump |
CN112685663A (en) * | 2020-12-21 | 2021-04-20 | 福建新大陆软件工程有限公司 | SPA multi-page label management method based on VUE |
CN112685663B (en) * | 2020-12-21 | 2023-05-12 | 福建新大陆软件工程有限公司 | SPA multi-tab management method based on VUE |
CN112650549A (en) * | 2020-12-23 | 2021-04-13 | 平安普惠企业管理有限公司 | Page jump method, device, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528432B (en) | The construction method and device of test scene data bury a test method | |
CN107256195B (en) | Webpage front-end test method and device | |
CN110008429A (en) | A kind of method for page jump and device, storage medium and terminal | |
CN104967542B (en) | A kind of test method, the device and system of the mobile terminal page | |
CN110020388A (en) | A kind of page display method and system | |
CN106484383A (en) | page rendering method, device and equipment | |
CN113987074A (en) | Distributed service full-link monitoring method and device, electronic equipment and storage medium | |
US11063853B2 (en) | Method and device to transfer to a virtual browser session based on responsiveness | |
CN108319662A (en) | Page processing method, device, electronic equipment and readable storage medium storing program for executing | |
CN102098327A (en) | Method and device for downloading online video sniffer | |
CN103297291A (en) | Method and system for monitoring website real-time statuses | |
Behl et al. | Architectural pattern of progressive web and background synchronization | |
CN104335524A (en) | Common web accessible data store for client side page processing | |
CN108989369A (en) | The method and its system of progress current limliting are requested user | |
CN108563469A (en) | page loading method, device, storage medium and terminal device | |
CN108280174A (en) | Front end file construction method and server, page access method and terminal | |
CN111694757A (en) | Application program testing method and device, electronic equipment and computer readable storage medium | |
CN113505302A (en) | Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment | |
CN108124273A (en) | A kind of method of acquisition of information, equipment and medium | |
US9419868B1 (en) | Visualization of user behavior | |
CN105119764A (en) | Method and device for monitoring flow | |
CN110209964A (en) | A kind of page display method, device and equipment | |
CN111800511A (en) | Processing method, system, equipment and readable storage medium for synchronous login state | |
CN105975389A (en) | Process data extraction method and apparatus | |
CN103997518B (en) | A kind of CDN node file synchronisation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |
|
RJ01 | Rejection of invention patent application after publication |