CN104765802B - Webpage methods of exhibiting and device - Google Patents

Webpage methods of exhibiting and device Download PDF

Info

Publication number
CN104765802B
CN104765802B CN201510144483.7A CN201510144483A CN104765802B CN 104765802 B CN104765802 B CN 104765802B CN 201510144483 A CN201510144483 A CN 201510144483A CN 104765802 B CN104765802 B CN 104765802B
Authority
CN
China
Prior art keywords
page
loading
url
back operation
complete
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.)
Active
Application number
CN201510144483.7A
Other languages
Chinese (zh)
Other versions
CN104765802A (en
Inventor
余再跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201510144483.7A priority Critical patent/CN104765802B/en
Publication of CN104765802A publication Critical patent/CN104765802A/en
Application granted granted Critical
Publication of CN104765802B publication Critical patent/CN104765802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of Webpage methods of exhibiting and device, this method to include:When receiving return command, back operation is performed;The previous page that the back operation shows for return before current page;After the completion of back operation each time, judge whether the uniform resource identifier URL of the page loaded after back operation is consistent with the URL of the page before back operation;If consistent, back operation is performed again;If inconsistent, the page loaded after back operation is shown.By method provided by the invention, common webpage can be directed to and perform return operation, and then user experience can be promoted.

Description

Webpage methods of exhibiting and device
Technical field
The present invention relates to network technique field more particularly to a kind of Webpage methods of exhibiting and device.
Background technology
UIWebView is a most common control in iOS system, belongs to the browser control part built in IOS systems, we It can be browsed webpage with it, be opened document etc..On UIWebView interfaces, it is two kinds of common buttons to retreat and return, For UIWebView, support back operation, i.e. goBack, such as:[self.webview goBack], you can so that Corresponding UIWebView backs to a page.
But UIWebView does not support to return, and e.g., there is following interface and operation:
Show A (A is homepage);
After user selects B, page B is jumped to by page A;
Assuming that the left side is student's list in page B, the right is the information for that student that user chooses.
User inquires data 1, that is, sends Post requests, obtain data 1;
Data 1 are appeared on B interfaces.(for example, the detailed user information of student Zhang San is presented now)
User inquires data 2, that is, sends Post requests, obtain data 2;
Data 2 are appeared on B interfaces.(for example, the detailed user information of student Li Si is presented now)
At this time, it if the user desired that returning, is desirable to back to A interfaces, and performs goBack (readjustment) at this time and only will B interfaces can be rested on, only user data becomes data 1.
It needs to provide a kind of method that can be realized and return to operation.
Invention content
The present invention be a kind of Webpage methods of exhibiting is provided, to realize the return function of webpage.
The present invention provides a kind of Webpage methods of exhibiting:Including:
When receiving return command, back operation is performed;The back operation is opened up for returning before current page The previous page shown;
After the completion of back operation each time, judge the uniform resource identifier URL of the page loaded after back operation with Whether the URL of the page before back operation is consistent;
If consistent, back operation is performed again;
If inconsistent, the page loaded after back operation is shown.
Further, the method includes:When the page of current presentation is not homepage, return command button is shown, When the page of current presentation is homepage, return command button is hidden;
It is described when receiving return command, perform back operation specifically include:It is detected described in user's triggering in reception During return command button, back operation is performed.
Further, it is described after the completion of back operation each time, judge the unified money of the page loaded after back operation Whether source indications URL and the URL of the page before back operation unanimously include:
After the completion of a loading page, judge that the URL for completing the URL and the page of last time loading of the page of loading is It is no consistent.
Further, the page loaded after the displaying back operation includes:
Whether the page for judging to complete loading may have occurred update, if the judgment is Yes, then the corresponding page of re-request Face simultaneously shows the page loaded after re-request;If the judgment is No, then the page for completing loading is shown.
Further, after the completion of a loading page, judge to complete the URL of the page of loading and the page of last loading Whether the URL in face unanimously specifically includes:
After the completion of a loading page, whether the page for judging to complete loading is the page loaded after re-request, and Only when being judged as NO, judge whether the URL for the page for completing to load is consistent with the URL of the page of last time loading.
The present invention also provides a kind of Webpages to show device, including:
Fallback block, for when receiving return command, performing back operation;The back operation is being worked as returning The previous page shown before the preceding page;
Judgment module, for after the completion of back operation each time, judging the unified money of the page loaded after back operation Whether source indications URL is consistent with the URL of the page before back operation;
The fallback block is additionally operable to judge in the judgment module URL and the retrogressing of the page loaded after back operation When the URL of the preoperative page is consistent, back operation is performed again;
Display module, for before the URL of the page and back operation that judge to load after back operation in the judgment module The page URL it is inconsistent when, show the page that loads after back operation.
Further, the display module is additionally operable to when the page of current presentation is not homepage, and display return command is pressed Button when the page of current presentation is homepage, hides return command button;
The fallback block is specifically used for, when reception detects that user triggers the return command button, performing and retreating behaviour Make.
Further, the judgment module is specifically used for after the completion of a loading page, judges to complete the page of loading URL with last time loading the page URL it is whether consistent.
Further, whether the page that the display module is specifically used for judging to complete loading may have occurred update, such as Fruit is judged as YES, then the corresponding page of re-request and shows the page loaded after re-request;If the judgment is No, then it shows Complete the page of loading.
Further, the judgment module is specifically used for after the completion of a loading page, judges to complete the page of loading Whether be the page loaded after re-request, and only when being judged as NO, judge to complete the URL of the page of loading with it is last plus Whether the URL of the page of load is consistent.
In the present invention, when receiving return command, back operation is performed;The back operation is for readjustment in current page The previous page shown before face;After the completion of back operation each time, the unified money of the page loaded after back operation is judged Whether source indications URL is consistent with the URL of the page before back operation;If consistent, back operation is performed again;If no Unanimously, the page obtained through back operation is shown.By method provided by the invention, return can be performed for common webpage Operation, and then user experience can be promoted.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below to embodiment or existing Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is only this hair Some bright embodiments, for those of ordinary skill in the art, without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of a kind of Webpage methods of exhibiting that one embodiment of the invention provides;
Fig. 2 is the structure diagram that a kind of Webpage that one embodiment of the invention provides shows device.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, clear, complete description is carried out to the technical solution in the embodiment of the present invention, it is clear that described embodiment is only Only it is part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiment of the present invention, ordinary skill people The every other embodiment that member is obtained without making creative work, shall fall within the protection scope of the present invention.
The present invention provides a kind of Webpage methods of exhibiting, and when receiving in return command, this method includes:It performs As shown in Figure 1:
Step S11 performs go back operation, rear steering step S12;
Step S12 after the completion of the operations of go back each time, judges the unified money of the page loaded after go back operations Whether the URL of the preoperative pages of source indications URL and go back is consistent;If not, turn to step S13;If it is, turn To step S11;
The page loaded after step S13, displaying go back operations.
By method provided by the invention, go back operations can be performed always until institute when receiving return command The URL of webpage before the URL of the webpage of the obtained page and execution go back is inconsistent, and obtained webpage is exported, this Sample can be directed to common webpage and realize return operation, and then can promote user experience.
In the specific implementation, method of the invention can be applied to by way of post obtain the situation of page data In.Further, suitable for IOS systems, go back operations here at this time correspond to method provided by the present invention The go back methods of IOS systems UIWebView.
In the specific implementation, can a return command button in interface is shown be set and shows user, to use Family inputs return command by clicking the return command button, and obtains return command input by user.At this point, above-mentioned method It can also include:When the page of current presentation is not homepage, return command button is shown, be homepage in the page of current presentation When, hide return command button:
At this point, above-mentioned step S11 can be specifically included:Detect that user triggers the return command button in reception When, perform go back operations.
In the specific implementation, step S12 here can be to be specially:
After the completion of a loading page, the URL for judging the URL and the page of last time loading of the page of this loading is It is no consistent.
Specifically, step S12 here can be by defining WebViewDidFinishiedLoad functions to judge this Whether the URL of the page of loading and the URL of the page of last time loading unanimously realize.Primary loading is often completed, performs primary institute Define WebViewDidFinishiedLoad functions.
In the specific implementation, above-mentioned step S13 can specifically include what is be not shown in figure:
Whether step S131, the page for judging to complete loading may have occurred update;If so, turn to step S132;It is no Then turn to step S133.
Step S132, the corresponding page of re-request simultaneously show the page loaded after re-request;
Step S133 then shows the page for completing loading.
It in this way can be after user inputs return instruction, by newest corresponding page presentation to user.It avoids mistake The data of phase show user, conducive to the usage experience of user is promoted.It can be appreciated that the corresponding page here refer to URL with The URL for completing the page of loading is identical, but the page that content of pages is different.
In the specific implementation, newer url list can will likely occur in advance to be arranged in specific configuration file.It Afterwards by the way that the URL of the page for completing loading is matched with the url list in configuration file, completion loading can determine Whether the page may update.
In the specific implementation, if being the page that this loading is judged after the completion of a loading page in step s 12 Whether the URL in face is consistent with the URL of the page of last time loading.And added after first determining whether go back operations in step s 13 Whether the page of load may have occurred update, if it is, the corresponding page of re-request and showing.It is likely to result in this way One problem is, in the re-request page each time and after loading, can all trigger the primary page for judging this loading Whether URL is consistent with the URL of the page of last time loading, and judging result at this time is yes, can trigger step S11 again, is Avoid such case, in the preferred embodiment of the invention, above-mentioned step S12 can specifically include:
After the completion of a loading page, judge complete loading the page whether be when being judged as YES in step S131 The page loaded after re-request in step S132, and only when being judged as NO, judge to complete the URL and upper one of the page of loading Whether the URL of the page of secondary loading is consistent.
In the specific implementation, when the page loaded after the page for judging to complete to load is re-request, step can be turned to Rapid S133, directly displaying complete the page of loading.
In the specific implementation, in above-mentioned step S12, the URL and go of the page loaded after go back operations is obtained Whether the URL of the preoperative pages of back can unanimously be realized by following code:
NSString*currentURL=self.webdata.request.URL.absoluteStr ing;// obtain and work as Preceding url;
if(![currentURL compare:Oldurl]) // judge whether new url and original url are identical.If It is identical, then it shrinks back again.
Above-mentioned code, which can be embedded into WebViewDidFinishiedLoad functions, to be realized, i.e., is loaded each time After the page, primary above-mentioned code is performed.
If in addition, there is the button for retreating cancellation etc in Webpage in itself, after can calling in javascript It moves back, can also operate cooperate with the goBack of UIWebView at this time, can mix the spurious with the genuine, make one or even do not see that this is One webpage.
Based on identical design, the present invention also provides a kind of Webpages to show device, as shown in Fig. 2, the device packet It includes:
Fallback block 21, for when receiving return command, performing go back operations;The go back operations are used for Return to the previous page shown before current page;
Judgment module 22, for after the completion of the operations of go back each time, judging the page loaded after go back operations The preoperative pages of uniform resource identifier URL and go back URL it is whether consistent;
The fallback block 21, be additionally operable to the judgment module judge the URL of the page loaded after go back operations with When the URL of the preoperative pages of go back is consistent, go back operations are performed again;
Display module 23, for the URL and go of the page for judging to load after go back operations in the judgment module 21 When the URL of the preoperative pages of back is inconsistent, the page loaded after go back operations is shown.
Webpage provided by the invention shows device, can perform go back behaviour always when receiving return command The URL for making the webpage before the URL and execution go back of the webpage of the obtained page is inconsistent, and by obtained net Page output can be directed to common webpage and realize return operation, and then can promote user experience in this way.
In the specific implementation, whether the judgment module 22 is specifically used for the page for judging to load after go back are operated For homepage, and only when being judged as NO, the uniform resource identifier URL and go of the page that are loaded after go back operations are judged Whether the URL of the preoperative pages of back is consistent.
In the specific implementation, the judgment module 22 can be specifically used for after the completion of a loading page, judge to complete Whether the URL of the page of loading is consistent with the URL of the page of last time loading.
In the specific implementation, whether the page that the display module 23 is specifically used for judging to complete loading may have occurred more Newly, if the judgment is Yes, then the corresponding page of re-request and the page loaded after re-request is shown;If the judgment is No, Then show the page for completing loading.
In the specific implementation, the judgment module 22 is specifically used for after the completion of a loading page, judges this loading The page whether be the page loaded after re-request, and only when being judged as NO, judge this loading the page URL with it is upper Whether the URL of the page once loaded is consistent..
The above description is merely a specific embodiment, and still, protection scope of the present invention is not limited to this, appoints What those familiar with the art in the technical scope disclosed by the present invention, the variation that can be readily occurred in or replacement, all It is covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the scope of the claims Subject to.

Claims (4)

1. a kind of Webpage methods of exhibiting, which is characterized in that including:
When receiving return command, back operation is performed;The back operation shows for return before current page Previous page;
After the completion of back operation each time, whether the page for judging to complete loading may have occurred update, if the judgment is Yes, The then corresponding page of re-request;If being judged as NO, after the completion of a loading page, whether the page for completing to load is judged For the page loaded after re-request, and only when being judged as NO, judge to complete the URL of the page of loading and last loading Whether the URL of the page is consistent;
If consistent, back operation is performed again;
If inconsistent, whether the page for judging to complete loading may have occurred update, if the judgment is Yes, then again please show The page loaded after asking;If the judgment is No, then the page for completing loading is shown;
When the page loaded after the page for judging to complete to load is re-request, the page of loading is completed in directly displaying;
Wherein, newer url list will likely occur in advance to be arranged in specific configuration file, by the page that will complete loading Whether the URL in face is matched with the url list in configuration file, judge the page of completion loading and may update.
2. the method as described in claim 1, which is characterized in that the method includes:It is not homepage in the page of current presentation When, it shows return command button, when the page of current presentation is homepage, hides return command button;
It is described when receiving return command, perform back operation specifically include:Detect that user triggers the return in reception During order button, back operation is performed.
3. a kind of Webpage shows device, which is characterized in that including:
Fallback block, for when receiving return command, performing back operation;The back operation is for return in current page The previous page shown before face;
Judgment module, for after the completion of back operation each time, judging whether the page for completing loading may have occurred update, If the judgment is Yes, then the corresponding page of re-request;If being judged as NO, after the completion of a loading page, judge to complete Whether the page of loading is the page loaded after re-request, and only when being judged as NO, and judges to complete the URL of the page of loading It is whether consistent with the URL of the page of last time loading;
The fallback block is additionally operable to judge in the judgment module URL and back operation of the page loaded after back operation When the URL of the preceding page is consistent, back operation is performed again;
Display module, for the page before the URL of the page and back operation that judge to load after back operation in the judgment module When the URL in face is inconsistent, whether the page for judging to complete loading may have occurred update, if the judgment is Yes, then show again The page loaded after request;If the judgment is No, then the page for completing loading is shown;When the judgment module judges to complete loading The page for load after re-request the page when, the page loaded is completed in directly displaying;
Wherein, newer url list will likely occur in advance to be arranged in specific configuration file, by the page that will complete loading Whether the URL in face is matched with the url list in configuration file, judge the page of completion loading and may update.
4. device as claimed in claim 3, which is characterized in that the display module be additionally operable to be not in the page of current presentation During homepage, return command button is shown, when the page of current presentation is homepage, hide return command button;
The fallback block is specifically used for, when reception detects that user triggers the return command button, performing back operation.
CN201510144483.7A 2015-03-30 2015-03-30 Webpage methods of exhibiting and device Active CN104765802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510144483.7A CN104765802B (en) 2015-03-30 2015-03-30 Webpage methods of exhibiting and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510144483.7A CN104765802B (en) 2015-03-30 2015-03-30 Webpage methods of exhibiting and device

Publications (2)

Publication Number Publication Date
CN104765802A CN104765802A (en) 2015-07-08
CN104765802B true CN104765802B (en) 2018-06-19

Family

ID=53647632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510144483.7A Active CN104765802B (en) 2015-03-30 2015-03-30 Webpage methods of exhibiting and device

Country Status (1)

Country Link
CN (1) CN104765802B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404517B (en) * 2015-11-27 2018-09-28 北京奇虎科技有限公司 A kind of browser and browser implementation method
CN106227887A (en) * 2016-08-12 2016-12-14 汪念鸿 A kind of method returning the former page in browser new page
CN106708930B (en) * 2016-11-17 2021-06-01 北京小米移动软件有限公司 Method and device for refreshing application page
CN107678814A (en) * 2017-09-11 2018-02-09 深圳天珑无线科技有限公司 One kind returns to event-handling method, device, mobile terminal and storage medium
CN107844583A (en) * 2017-11-13 2018-03-27 深圳峰创智诚科技有限公司 The implementation method and device that the application program page returns
CN107943917A (en) * 2017-11-20 2018-04-20 珠海市魅族科技有限公司 The page returns to control method, device, terminal and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870189A (en) * 2012-12-18 2014-06-18 史嫚嫚 Web page returning method of browser of touch screen intelligent terminal according to touch time

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9165082B2 (en) * 2011-01-21 2015-10-20 Microsoft Technology Licensing, Llc Direct navigation through browser address bar

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870189A (en) * 2012-12-18 2014-06-18 史嫚嫚 Web page returning method of browser of touch screen intelligent terminal according to touch time

Also Published As

Publication number Publication date
CN104765802A (en) 2015-07-08

Similar Documents

Publication Publication Date Title
CN104765802B (en) Webpage methods of exhibiting and device
CN106294372B (en) Application program page quick access method and the mobile terminal for applying it
US10649631B2 (en) Method and apparatus for adding icon to interface of android system, and mobile terminal
US9003283B2 (en) Copying text using parameters displayed on a clipboard
CN106708557B (en) Update processing method and device for terminal application
CN105068721B (en) A kind of actions menu display methods and terminal
CN101765236B (en) Mobile terminal interface switching method and mobile terminal
WO2016029770A1 (en) Method for split-screen displaying, mobile terminal and storage medium
CN106951335B (en) Process daemon method and mobile terminal
US9727354B2 (en) System and methods for loading an application and its modules in a client device
CN105373326B (en) Data processing system and method
CN105573748B (en) Shortcut key customization method and intelligent terminal
CN105573587B (en) A kind of method and device of management of icons
EP2946574A1 (en) Systems and methods for building and using hybrid mobile applications
CN106649497B (en) Webpage display method and device
CN105354065B (en) A kind of multi-product method for upgrading software and terminal
US10528246B2 (en) Method and device for managing information
CN104516782A (en) Method for switching operating environments of intelligent system and equipment
CN105760794A (en) Method, device and terminal equipment displaying private information
CN104346261B (en) A kind of the unloading reminding method and device of application program
WO2017041632A1 (en) Method and apparatus for transferring data in display page
KR100885523B1 (en) A display module, a device, a computer software product and a method for a user interface view
CN108197024B (en) Embedded browser debugging method, debugging terminal and computer readable storage medium
CN104793844B (en) Plug-in achieving method and device based on host program on mobile terminal
CN113835588A (en) Shortcut setting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant