CN108932243B - Method and device for refreshing webpage - Google Patents
Method and device for refreshing webpage Download PDFInfo
- Publication number
- CN108932243B CN108932243B CN201710373274.9A CN201710373274A CN108932243B CN 108932243 B CN108932243 B CN 108932243B CN 201710373274 A CN201710373274 A CN 201710373274A CN 108932243 B CN108932243 B CN 108932243B
- Authority
- CN
- China
- Prior art keywords
- webpage
- type
- page
- information
- video
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000006870 function Effects 0.000 claims description 51
- 238000012545 processing Methods 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 8
- 239000000284 extract Substances 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 4
- 239000000463 material Substances 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
A method and a device for refreshing web pages. The method comprises the following steps: displaying a webpage; acquiring a refreshing instruction corresponding to the webpage, wherein the refreshing instruction is used for indicating reloading the webpage; after the refresh indication is obtained, if the need of sending out a prompt is determined according to the type of the webpage, a prompt popup window is displayed, wherein the prompt popup window comprises prompt information which is used for prompting whether to confirm reloading the webpage or not. The technical scheme provided by the embodiment of the invention can effectively avoid the misoperation of refreshing the webpage and reduce the occurrence of misoperation.
Description
Technical Field
The embodiment of the invention relates to the technical fields of computers and Internet, in particular to a method and a device for refreshing web pages.
Background
Currently, many content or services on the internet are provided to users by means of web pages, such as news, video, microblog, email services, and so forth.
In the process of viewing and using the webpage, if the user encounters problems of page blocking, page content expiration and the like, the webpage needs to be refreshed, namely reloaded. And the user clicks the refreshing function control corresponding to the webpage, so that the webpage refreshing can be triggered. The refreshing function control can be triggered and displayed by the operation of a user, for example, the focus of a mouse is moved to a webpage and the mouse is clicked to the right; alternatively, the refresh function control may be displayed directly beside or on top of the web page.
In practical applications, it often happens that a user unintentionally triggers to refresh a web page, for example, the user carelessly clicks a refresh function control, so that related applications may misexecute the operation of refreshing the web page.
Disclosure of Invention
In order to solve the problem that related applications are easy to cause misoperation of refreshing webpage in related technologies, the embodiment of the invention provides a method and a device for refreshing webpage. The technical scheme is as follows:
in a first aspect, a method for refreshing a web page is provided, the method comprising:
displaying a webpage;
acquiring a refreshing instruction corresponding to the webpage, wherein the refreshing instruction is used for indicating reloading the webpage;
after the refresh indication is obtained, if the type of the webpage is determined that the webpage needs to be sent out, a reminding popup window is displayed, wherein the reminding popup window comprises reminding information, and the reminding information is used for reminding whether to confirm reloading the webpage or not.
In a second aspect, there is provided an apparatus for refreshing web pages, the apparatus comprising:
the webpage display module is used for displaying webpage pages;
the instruction acquisition module is used for acquiring a refreshing instruction corresponding to the webpage, and the refreshing instruction is used for indicating to reload the webpage;
And the popup window display module is used for displaying a prompting popup window if the type of the webpage is determined to be required to send out a prompt after the refresh indication is acquired, wherein the prompting popup window comprises prompting information which is used for prompting whether to confirm reloading the webpage or not.
In a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
displaying a webpage;
acquiring a refreshing instruction corresponding to the webpage, wherein the refreshing instruction is used for indicating reloading the webpage;
after the refresh indication is obtained, if the type of the webpage is determined that the webpage needs to be sent out, a reminding popup window is displayed, wherein the reminding popup window comprises reminding information, and the reminding information is used for reminding whether to confirm reloading the webpage or not.
In a fourth aspect, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
displaying a webpage;
Acquiring a refreshing instruction corresponding to the webpage, wherein the refreshing instruction is used for indicating reloading the webpage;
after the refresh indication is obtained, if the type of the webpage is determined that the webpage needs to be sent out, a reminding popup window is displayed, wherein the reminding popup window comprises reminding information, and the reminding information is used for reminding whether to confirm reloading the webpage or not.
In one possible design, the computer device is a terminal or a server.
In a fifth aspect, there is provided a computer program product for performing the method of refreshing web pages of the first aspect described above when the computer program product is executed.
The technical scheme provided by the embodiment of the invention can bring the following beneficial effects:
after the refresh indication corresponding to the currently displayed webpage is obtained, the webpage is not refreshed directly, but prompt information is displayed first, and the user is prompted by the prompt information whether to confirm reloading the webpage or not, so that the operation of refreshing the webpage can be effectively avoided, and the occurrence of misoperation is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of refreshing web pages provided by one embodiment of the present invention;
FIG. 2 is a schematic diagram of an interface for triggering a refresh page, which is exemplary shown in accordance with one embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an interface of reminder information according to an exemplary embodiment of the present invention;
FIG. 4 is a schematic diagram of an interface for another alert message according to an exemplary embodiment of the present invention;
FIG. 5 is a schematic diagram of an interface for a reminder according to yet another exemplary embodiment of the present invention;
FIG. 6 is a flow chart of a method for refreshing web pages provided by another embodiment of the present invention;
FIG. 7 is a schematic diagram of a setup interface, shown schematically, according to one embodiment of the invention;
FIG. 8 is a block diagram of an apparatus for refreshing web pages provided by one embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
In the case where the related application erroneously performs an operation of refreshing the web page, a great deal of inconvenience is brought to the user. For example, when the web page is a video playing page, if the video playing page plays a section of advertisement before the video playing page is loaded and begins to formally play the video each time, after the video playing page is reloaded due to misoperation, the advertisement is again played, and the video is reloaded, so that the video watching experience of the user is affected. For another example, when the web page is a microblog editing page, if a user has input a piece of blog content in the microblog editing page, reloading the microblog editing page due to misoperation under the condition that the blog content is not stored, the previously input blog content is lost, and unnecessary repeated operation is brought to the user.
In order to solve the problem that related applications are easy to cause misoperation of refreshing webpage in related technologies, the embodiment of the invention provides a method for refreshing webpage and a device based on the method. In the scheme provided by the embodiment of the invention, after the refresh indication corresponding to the currently displayed webpage is obtained, the webpage is not refreshed directly, but the reminding information is displayed first, and the reminding information is used for reminding a user whether to confirm reloading the webpage or not, so that the operation of refreshing the webpage can be effectively avoided, and the occurrence of misoperation is reduced.
The method provided by the embodiment of the invention can be applied to the terminal. For example, the terminal may be an electronic device such as a cell phone, tablet computer, electronic book reader, multimedia playing device, wearable device, PC (Personal Computer ), etc.
In the method embodiment of the invention, the execution subject of each step can be an application program with webpage loading and displaying functions, such as a browser, a social application client, a video playing application client and the like. In other possible implementations, the steps in the method embodiment of the present invention are performed by the first application program and the second application program in an interactive cooperation manner. The first application is an application having web page loading and display functions. The second application program has the functions of determining the type of the webpage, determining whether to send out a reminder according to the type of the webpage, and displaying a reminder popup. The first application provides an interface to the second application through which the second application can obtain information from the first application and feed information back to the first application. Of course, the above functional division for the first application program and the second application program is merely exemplary and explanatory, and may be divided according to the requirements in practical applications to implement the above reminding function during refresh, which is not limited in the embodiment of the present invention.
In the following method embodiments, unless otherwise specified, only the execution subject of each step is exemplified as a browser for the sake of simplicity of description, but this is not limitative.
The embodiments of the present invention will be described in further detail below based on the common aspects related to the embodiments of the present invention described above.
Referring to fig. 1, a flowchart of a method for refreshing a web page according to an embodiment of the invention is shown. The method may comprise the following steps.
The browser displays the web page. A Web page is a plain text file containing HTML (HyperText Markup Language ) tags that can be stored in a computer at a corner of the World, a "page" in the WWW (World Wide Web). The file format of the webpage is in an HTML format, and the file extension is HTML or htm. The web page is presented by a web browser (browser for short). The page of the webpage displayed by the browser is the webpage page.
The browser obtains a refresh indication corresponding to the web page. The refresh indication is triggered by the user. In the embodiment of the present invention, the manner of triggering the refresh indication is not limited. For example, the user moves the focus of the mouse to the web page and right clicks the mouse to trigger the browser to display an operation menu corresponding to the web page, wherein the operation menu comprises a refreshing function control (such as a refreshing option or a reloading option), and the user uses the mouse to click the refreshing function control to trigger the refreshing instruction. Accordingly, the browser acquires an event that the mouse clicks the refresh function control, namely acquires a refresh indication corresponding to the webpage. For another example, a refresh function control (e.g., a button) is displayed next to or on top of the web page, and the user clicks on the refresh function control to trigger a refresh indication. Accordingly, the browser acquires an event of clicking the refresh function control, namely acquires a refresh indication corresponding to the webpage. As shown in fig. 2, the refresh function control 22 is displayed on the upper layer of the web page 21, and when the user needs to refresh the web page, the refresh function control 22 is clicked. Also for example, the user pulling a web page triggers a refresh indication. Accordingly, when the browser acquires a sliding operation signal (for example, a downward sliding operation signal) acting on the web page, it acquires a refresh instruction corresponding to the web page.
In the embodiment of the invention, refreshing the webpage refers to reloading the webpage.
In the embodiment of the present invention, after the browser acquires the refresh indication corresponding to the web page, the web page is not directly refreshed, which performs step 103 described below.
After the browser acquires the refreshing instruction, whether to send out a prompt is determined according to the type of the webpage. In one possible implementation manner, the browser detects whether the preset table includes the type of the currently displayed webpage; if the preset table comprises the types of the webpage, determining to send out a prompt; if the type of the webpage is not included in the preset table, determining that no reminding is sent out. The preset table is used for storing the types of webpage pages which need to send out reminding when reloading. For example, the preset table includes types A, B and C, and if the type of the web page is a, the browser determines to send out a reminder; assuming that the type of the webpage is D, the browser determines that no reminder is sent.
In one example, the preset table records a correspondence between at least one group of types and processing manners. The processing mode is used for indicating to send out a reminder when reloading or not sending out a reminder when reloading. Exemplary preset tables are shown in table-1 below:
TABLE-1
After the browser acquires the refresh instruction, the browser queries the preset table shown in the table-1 to acquire a processing mode corresponding to the type of the currently displayed webpage, so as to determine whether to send out a reminder.
In the embodiment of the invention, the webpage is divided into different types, and the webpage can be divided into different types from the dimensions of the content, the function, the webpage address and the like of the webpage in actual implementation. Illustratively, the types of web pages include the following: video pages that cannot skip the top-of-the-chip ads, tool class pages, pages where the refresh content is automatically updated, etc. The video page that cannot skip the title advertisement refers to a web page for playing video, and the title advertisement needs to be played before playing video, such as a video playing page of each large video website. A tool class page refers to a web page for providing a certain function to a user, and the user needs to input, select, or submit some information or material on the web page when using the function. For example, a web page provided with a function of converting a video format, on which a user needs to upload a video file to be format-converted. For another example, a web page with a function of converting a geographic location name and longitude and latitude coordinates is provided, and the user needs to input the geographic location name or longitude and latitude coordinates to be queried in the web page. For another example, a web page provided with a mail sending function, in which the user needs to input the content of a mail to be sent. The page where the refreshing content is automatically updated refers to a webpage where the content displayed originally after reloading is changed or lost, such as a microblog page, a personal space page, etc. In the embodiment of the present invention, the types of the 3 listed web pages may be recorded in a preset table, and when the browser determines that the type of the currently displayed web page belongs to any one of the 3 types, it determines to issue a reminder.
In addition, the types included in the preset table, or the correspondence between the types and the processing modes included in the preset table, may be preconfigured by a technician, or may be preset by a user in a customized manner.
In the event that a determination is made to issue a reminder, the browser displays a pop-up window, which may be referred to as a reminder pop-up window. The reminding popup window comprises reminding information, wherein the reminding information is used for reminding whether to confirm reloading of the currently displayed webpage. Illustratively, the reminder information is as follows, "please confirm whether to reload the web page.
Optionally, the reminding information displayed in the reminding popup window is different for different types of web pages. The preset table further comprises a corresponding relation between the type and the reminding information. The browser acquires the reminding information corresponding to the type of the currently displayed webpage from the preset table, and the reminding popup window comprises the acquired reminding information. For example, for a video page that cannot skip a top advertisement, the corresponding alert information is "refresh will cause the advertisement before the video of the current page to be replayed, cannot skip, affect the real video playing, is it continued? ". For the tool page, the corresponding alert information is "this is the tool page, refresh will result in the loss of previous work progress, is it continued? ". For a page whose refresh content is automatically updated, the corresponding reminder is as follows, "the content is automatically updated after the page is refreshed, and whether the content displayed before is continued or not may not be found.
The reminding information corresponding to each type can be preconfigured by a technician, can be preset by a user in a customized mode, and can be generated by a browser according to the type of the webpage and the reminding information template. For example, the alert message template is as follows, "this is xxx, do it continue? The "xxx" section above fills out the type of web page currently displayed.
Optionally, the reminding popup window further comprises: a first control and a second control. The first control is used for triggering reloading of the webpage, and the second control is used for triggering canceling of reloading of the webpage. And after acquiring the trigger signal corresponding to the first control, the browser reloads the currently displayed webpage. After the browser acquires the trigger signal corresponding to the second control, the reminding popup window is closed, the currently displayed webpage is not reloaded, and the display state of the webpage is maintained.
In one example, referring to fig. 3 in combination, assuming that the web page 31 currently displayed by the browser is a video playing page of a certain video website, after obtaining the refresh indication, the browser determines that a reminder needs to be sent according to the type of the web page 31, and then a reminder pop-up window 32 is displayed on the upper layer of the web page 31, where the reminder pop-up window 32 includes reminder information 33, a ok button 34 and a cancel button 35. The user clicks the ok button 34 and the browser reloads and displays the web page. The user clicks the cancel button 35, and the browser closes the reminder popup 32 without reloading the currently displayed web page, maintaining the display state of the web page.
In another example, referring to fig. 4 in combination, assuming that the web page 41 currently displayed by the browser is a web page providing a function of converting a video format, after obtaining the refresh indication, the browser determines that a reminder needs to be sent according to the type of the web page 41, a reminder pop 42 is displayed on an upper layer of the web page 41, and the reminder pop 42 includes reminder information 43, a ok button 44, and a cancel button 45. The user clicks the ok button 44 and the browser reloads and displays the web page. The user clicks the cancel button 45, the browser closes the reminder popup 42, and the currently displayed web page is not reloaded, and the display state of the web page is maintained.
In yet another example, referring to fig. 5 in combination, assuming that the web page 51 currently displayed by the browser is a microblog page, after the refresh indication is obtained, the browser determines that a reminder needs to be sent according to the type of the web page 51, and then a reminder pop 52 is displayed on an upper layer of the web page 51, where the reminder pop 52 includes reminder information 53, a ok button 54, and a cancel button 55. The user clicks the ok button 54 and the browser reloads and displays the web page. The user clicks the cancel button 55, and the browser closes the reminder popup 52 without reloading the currently displayed web page, maintaining the display state of the web page.
In addition, the browser reloads the currently displayed web page if it is determined that no reminder is issued.
In summary, according to the method provided by the embodiment of the invention, after the refresh indication corresponding to the currently displayed webpage is obtained, the webpage is not refreshed directly, but the reminding information is displayed first, and the user is reminded whether to confirm reloading the webpage or not through the reminding information, so that the operation of refreshing the webpage can be effectively avoided, and the occurrence of misoperation is reduced.
Referring to fig. 6, a flowchart of a method for refreshing web pages according to another embodiment of the present invention is shown. The method may comprise the following steps.
After acquiring the open instruction corresponding to any one of the web pages, the browser requests to acquire the HTML file from the server according to the URL (Uniform Resource Locator ) of the web page, and then displays the web page through operations such as parsing, rendering, and the like.
And the browser acquires the information of the webpage. The information of the webpage comprises: the URL of the web page and/or the content of the web page. The content of the web page may be extracted from an HTML file of the web page, for example, the content of the web page includes content such as a title, video, picture, program, and the like.
In one possible implementation, the browser parses an HTML file corresponding to a web page, and extracts information of the web page from the HTML file. In another possible implementation manner, the web page has a function of actively providing information to the browser, and the web page sends the information to the browser in a broadcast manner.
And the browser determines the type of the webpage according to the information of the webpage. In one possible implementation, the browser extracts features of the web page from the information of the web page; searching a preset corresponding relation, and acquiring the type corresponding to the characteristic of the webpage as the type of the webpage. The preset corresponding relation comprises corresponding relation between the characteristics and the types. For example, the browser extracts keywords from URLs of web pages, extracts key contents from contents of web pages, and the extracted keywords and key contents serve as features of the web pages. The preset correspondence may be stored in the form of a table.
In one example, assuming that the URL of the web page is http:// www.xxxxx.com/v_19rrok6g64.Html, the URL includes a keyword xxxxx, the content of the web page includes video, and the type corresponding to the feature recorded in the preset correspondence is a video page that cannot skip the head advertisement, the browser determines that the type of the web page is a video page that cannot skip the head advertisement.
In addition, the preset corresponding relation can be preset by a technician or can be preset by a user in a customized manner.
Optionally, the method provided by the embodiment of the invention further comprises the following steps:
1. displaying a setting page;
the setting page refers to a user interface for a user to perform custom setting on the type of the webpage which needs to send out a reminder when reloading.
2. Acquiring the type and the corresponding characteristics of a webpage which is set in a setting page and needs to send out a reminder when reloading;
illustratively, as shown in FIG. 7, one setup page 71 is shown. The settings page 71 includes a number of types that can be selected by the user, each type having a corresponding selection control 72 and configuration control 73. The user may select the type of web page that needs to be alerted when reloaded by selection control 72, depending on the actual needs. The user can also customize the configuration of the features corresponding to the types through the configuration control 73 according to the actual requirements.
3. And adding the corresponding relation between the types and the features set in the setting page into a preset corresponding relation.
Optionally, the browser may further add the type of the web page set in the setting page by the user and required to issue a reminder at the time of reloading to the preset table described above. Or the browser adds the types of the webpage which are set in the setting page and need to send out the reminder when reloading and the types of the webpage which do not need to send out the reminder when reloading into the preset table introduced above, and sets the corresponding processing mode.
Optionally, the setting page is further provided with a function of custom adding the type of the web page. As shown in fig. 7, the user clicks the "add custom type" button 74 to customize the type of the added web page, and selects whether to use the added type as the type of the web page to be reminded through the selection control 72 described above, and configures the feature corresponding to the added type through the configuration control 73 described above.
In addition, in this embodiment, when the browser loads and displays a web page, the browser may acquire information of the web page and determine the type of the web page, so that whether a reminder needs to be sent or not can be determined more efficiently when a refresh instruction corresponding to the web page is acquired later. Currently, in other possible implementations, the browser may also perform the steps of acquiring information of a web page and determining a type of the web page after acquiring a refresh indication corresponding to the web page.
Optionally, the reminding popup includes reminding information, a first control and a second control. The reminding information is used for reminding whether to confirm reloading the webpage or not, the first control is used for triggering reloading the webpage, and the second control is used for triggering canceling reloading the webpage.
For the description of steps 604-608, reference may be made to the description of steps 102-104 in the embodiment of fig. 1, which is not repeated in this embodiment.
In addition, in one possible implementation manner, after the browser acquires the refresh indication, the browser acquires the state of the webpage, and determines whether to issue a reminder according to the type and the state of the webpage. The states they have vary for different types of web pages. For example, for a video page that cannot skip a head advertisement, its status may include not playing video, pausing playing video, etc. For another example, for a tool class page, its state may include not uploaded data, uploaded data and unprocessed data, uploaded data and being processed data, uploaded data and processed completed. Correspondingly, the preset table comprises the corresponding relation among the types, the states and the processing modes. For example, the type is video pages which cannot skip the head advertisements, the state is that the video is not played, and the corresponding processing mode is that no reminder is sent; the type is that the video page of the head advertisement can not be skipped, the state is that the video is being played or the video is paused, and the corresponding processing mode is that a reminder is sent out. After the browser obtains the state of the webpage, a preset table is queried to obtain a processing mode corresponding to the type and the state of the webpage, and whether a prompt is sent out is determined according to the processing mode. By the mode, the two factors of the type and the state of the webpage are comprehensively considered to determine whether to send out the prompt, the accuracy is higher, and the actual application requirements are better met.
In summary, according to the method provided by the embodiment of the invention, when the webpage is loaded and displayed, the information of the webpage is acquired, and the type of the webpage is determined, so that whether the prompt needs to be sent or not can be more efficiently determined when the refresh indication corresponding to the webpage is acquired later.
In addition, the functions of the type of the webpage required to send out the prompt, the corresponding relation between the type of the webpage and the characteristics, the type of the custom-added webpage, the corresponding relation between the type of the webpage and the prompt information and the like are provided for the user through the setting page, so that the personalized requirements of the user are better met.
In actual implementation, the reminding function provided by the embodiment of the invention can be expanded in the first application program (namely, the application program with the webpage loading and displaying functions, such as a browser), or a second application program with the reminding function provided by the embodiment of the invention can be independently developed, and the second application program is matched with the first application program in an interaction way to complete the reminding function.
In one example, taking a first application program as a browser, a second application program is taken as an example of a third party application with the reminding function provided by the embodiment of the invention. And when the browser is started, calling the third-party application to enable the third-party application to start and run. After the browser acquires the opening instruction corresponding to the webpage, loading and displaying the webpage, acquiring information of the webpage, and then transmitting the information of the webpage to a third party application. And the third party application determines the type of the webpage according to the information of the webpage. And when the third party application detects that the browser acquires the refresh indication corresponding to the webpage, determining whether to send out a reminder according to the type of the webpage. If the third party application sends out the prompt, or the third party application sends out a prompt instruction to the browser, the browser sends out the prompt according to the prompt instruction, the prompt instruction is used for indicating the browser to send out the prompt, and the prompt instruction optionally comprises prompt information. In addition, the third party application may obtain relevant information of the browser (such as information of the web page and refresh indication) through the following two possible implementations: in a first possible implementation manner, the browser actively transmits related information to the third party application in a broadcast manner; in a second possible implementation, the third party application uses a Hook function to obtain relevant information from the browser. For the two modes provided by the embodiment of the invention, if the reminding function provided by the embodiment of the invention is directly expanded in the first application program (namely, the application program with the webpage loading and displaying functions, such as a browser), a third party application is not required to be installed; if a second application program with the reminding function provided by the embodiment of the invention is independently developed and the second application program is matched with the first application program in an interactive way to finish the reminding function, the first application program does not need to be modified, and a plurality of different first application programs installed on the terminal can be supported to realize the reminding function.
The following are examples of the apparatus of the present invention that may be used to perform the method embodiments of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.
Referring to fig. 8, a block diagram of an apparatus for refreshing web pages according to an embodiment of the present invention is shown. The device has the function of realizing the method example, and the function can be realized by hardware or can be realized by executing corresponding software by hardware. The apparatus may include: a web page display module 810, an indication acquisition module 820, and a pop-up display module 830.
The web page display module 810 is configured to display a web page.
An instruction acquisition module 820, configured to acquire a refresh instruction corresponding to the web page, where the refresh instruction is used to instruct reloading of the web page.
And the pop-up window display module 830 is configured to display a reminder pop-up window if it is determined that a reminder needs to be sent according to the type of the web page after the refresh indication is obtained, where the reminder pop-up window includes reminder information, and the reminder information is used for reminding whether to confirm reloading the web page.
In summary, the device provided by the embodiment of the invention does not directly refresh the webpage after obtaining the refresh indication corresponding to the webpage displayed currently, but displays the reminding information first, and reminds the user whether to confirm reload the webpage or not through the reminding information, so that the operation of refreshing the webpage can be effectively avoided, and the occurrence of misoperation is reduced.
In an alternative embodiment provided based on the embodiment of fig. 8, the apparatus further comprises: and the information acquisition module and the type determination module.
The information acquisition module is used for acquiring the information of the webpage, and the information of the webpage comprises the following components: the URL of the web page and/or the content of the web page.
And the type determining module is used for determining the type of the webpage according to the information of the webpage.
Optionally, the type determining module is configured to: extracting the characteristics of the webpage from the information of the webpage; searching a preset corresponding relation, and obtaining a type corresponding to the characteristic of the webpage as the type of the webpage, wherein the preset corresponding relation comprises the corresponding relation between the characteristic and the type.
Optionally, the apparatus further comprises: the device comprises a page display module, a setting acquisition module and a setting adding module.
And the page display module is used for displaying the setting page.
The setting acquisition module is used for acquiring the type of the webpage which is set in the setting page and needs to send out the reminding when reloading and the corresponding characteristics.
And the setting adding module is used for adding the corresponding relation between the type and the feature set in the setting page to the preset corresponding relation.
In another alternative embodiment provided based on the embodiment of fig. 8, the apparatus further comprises: the reminding determining module is used for: detecting whether a preset table comprises the type of the webpage or not, wherein the preset table is used for storing the type of the webpage which needs to send out a prompt when reloading; and under the condition that the type of the webpage is included in the preset table, determining to send out a reminder.
Optionally, the preset table further includes a correspondence between the type and the reminding information. The apparatus further comprises: the reminding acquisition module is used for acquiring reminding information corresponding to the type of the webpage from the preset table, and the reminding popup window comprises the reminding information corresponding to the type of the webpage.
In another alternative embodiment provided based on the embodiment of fig. 8, the alert window further includes: a first control and a second control. The apparatus further comprises: a processing module for: reloading the webpage after acquiring a trigger signal corresponding to the first control; or after the trigger signal corresponding to the second control is acquired, the webpage is not reloaded.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 9, a schematic structural diagram of a terminal according to an embodiment of the present invention is shown. The terminal is used for implementing the method for refreshing the webpage provided in the embodiment. Specifically, the present invention relates to a method for manufacturing a semiconductor device.
Terminal 900 can include RF (Radio Frequency) circuitry 910, memory 920 including one or more computer-readable storage media, input unit 930, display unit 940, sensor 950, audio circuit 960, wiFi (wireless fidelity ) module 970, processor 980 including one or more processing cores, and power supply 990, among other components. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 9 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The RF circuit 910 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 980; in addition, data relating to uplink is transmitted to the base station. Typically, the RF circuitry 910 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier ), a duplexer, and the like. In addition, the RF circuitry 910 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service ), CDMA (Code Division Multiple Access, code division multiple access), WCDMA (Wideband Code Division Multiple Access ), LTE (Long Term Evolution, long term evolution), email, SMS (Short Messaging Service, short message service), and the like.
The memory 920 may be used to store software programs and modules that the processor 980 performs various functional applications and data processing by executing the software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the terminal 900, etc. In addition, memory 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 920 may also include a memory controller to provide access to memory 920 by processor 980 and input unit 930.
The input unit 930 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 930 may include an image input device 931 and other input devices 932. The image input device 931 may be a camera or an optoelectronic scanning device. The input unit 930 may include other input devices 932 in addition to the image input device 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 940 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal 900, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 940 may include a display panel 941, and alternatively, the display panel 941 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like.
Terminal 900 can also include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 941 and/or the backlight when the terminal 900 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the terminal 900 are not described in detail herein.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 900 can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 970, so that wireless broadband Internet access is provided for the user. Although fig. 9 shows a WiFi module 970, it is understood that it does not belong to the essential constitution of the terminal 900, and can be omitted entirely as required within the scope of not changing the essence of the invention.
Terminal 900 can also include a power source 990 (e.g., a battery) for powering the various components, which can be logically connected to processor 980 by a power management system, such as for performing charge, discharge, and power management functions by the power management system. The power source 990 may also include one or more of any components, such as a direct current or alternating current power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 900 may further include a bluetooth module or the like, which is not described herein.
In particular, in this embodiment, terminal 900 further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include instructions for performing the method of refreshing web pages described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, e.g., a memory, comprising instructions that are executed by a processor of the terminal to perform the steps of the method embodiments described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer device is also provided. The computer device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the steps of the method embodiments described above when executing the program. In one possible design, the computer device is a terminal or a server.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," and the like, as used herein, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The foregoing description of the exemplary embodiments of the invention is not intended to limit the invention to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.
Claims (10)
1. A method of refreshing web pages, the method comprising:
displaying a webpage by a browser;
when loading and displaying the webpage, the browser acquires information of the webpage and sends the information of the webpage to a third party application;
the third party application determines the type of the webpage according to the information of the webpage;
the browser acquires a refreshing instruction corresponding to the webpage, wherein the refreshing instruction is used for indicating reloading the webpage;
the browser acquires the state of the webpage; transmitting the state of the webpage to the third party application;
the third party application queries a preset table to obtain a processing mode corresponding to the type and the state of the webpage, wherein the preset table is used for storing the corresponding relation among the type, the state and the processing mode of the webpage needing to send out a prompt when reloading, and the type of the webpage needing to send out the prompt comprises at least one of the following: the method comprises the steps that a video page of a head advertisement cannot be skipped, a tool page and a page with refreshing content capable of being automatically updated are used for playing the video, the head advertisement is required to be played before the video is played, the tool page is a webpage with a function of processing information or materials input by a user, and the page with refreshing content capable of being automatically updated is a webpage with changing or losing content displayed before and after loading;
Under the condition that the processing mode is to send out a prompt, the third party application acquires prompt information corresponding to the type of the webpage from the preset table, wherein the prompt information is used for prompting whether to confirm reloading the webpage;
after the browser obtains the refresh indication, and the third party application determines that a reminder needs to be sent according to the type and the state of the webpage, the browser or the third party application displays a reminder popup window, wherein the reminder popup window comprises the obtained reminder information, and the process of determining that the reminder needs to be sent according to the type and the state of the webpage comprises the following steps: the third party application determines that no reminder is sent out based on the fact that the type of the webpage is the video webpage which cannot skip the head advertisement and the state is the unreported video; the third party application determines to send a reminder based on the type of the webpage being the video page which cannot skip the head advertisement and the state not playing video or pausing playing video;
the method further comprises the steps of:
the browser displays a setting page;
The browser acquires the type of the webpage which is set in the setting page and needs to send out reminding when reloading and the corresponding characteristics;
the browser adds the correspondence between the types and the features set in the setting page to the preset table.
2. The method of claim 1, wherein the information of the web page comprises: the uniform location resource identifier (URL) of the webpage and/or the content of the webpage.
3. The method of claim 2, wherein the third party application determining the type of the web page based on the information of the web page comprises:
the third party application extracts the characteristics of the webpage from the information of the webpage;
and the third party application acquires a type corresponding to the characteristic of the webpage as the type of the webpage according to searching a preset corresponding relation, wherein the preset corresponding relation comprises the corresponding relation between the characteristic and the type.
4. A method according to any one of claims 1 to 3, wherein the reminder popup further comprises: the first control and the second control;
The method further comprises the steps of:
the browser reloads the webpage after acquiring a trigger signal corresponding to the first control;
or,
and after the browser acquires the trigger signal corresponding to the second control, not reloading the webpage.
5. An apparatus for refreshing web pages, the apparatus comprising:
the webpage display module is used for displaying webpage pages;
the information acquisition module is used for acquiring information of the webpage when the webpage is loaded and displayed;
the type determining module is used for determining the type of the webpage according to the information of the webpage;
the instruction acquisition module is used for acquiring a refreshing instruction corresponding to the webpage, and the refreshing instruction is used for indicating to reload the webpage;
the type determining module is further used for obtaining the state of the webpage;
the reminding determining module is used for inquiring a preset table to acquire a processing mode corresponding to the type and the state of the webpage; the preset table is used for storing the corresponding relation among the type, the state and the processing mode of the webpage needing to send out the prompt when reloading, and the type of the webpage needing to send out the prompt comprises at least one of the following: the method comprises the steps that a video page of a head advertisement cannot be skipped, a tool page and a page with refreshing content capable of being automatically updated are used for playing the video, the head advertisement is required to be played before the video is played, the tool page is a webpage with a function of processing information or materials input by a user, and the page with refreshing content capable of being automatically updated is a webpage with changing or losing content displayed before and after loading;
The reminding acquisition module is used for acquiring reminding information corresponding to the type of the webpage from the preset table under the condition that the processing mode is reminding, wherein the reminding information is used for reminding whether to confirm reloading the webpage or not;
the pop-up window display module is used for displaying a reminding pop-up window when the refresh indication is acquired and the reminding needs to be sent out according to the type and the state of the webpage, the reminding pop-up window comprises the acquired reminding information, and the process of determining that the reminding needs to be sent out by the third party application according to the type and the state of the webpage comprises the following steps: the third party application determines that no reminder is sent out based on the fact that the type of the webpage is the video webpage which cannot skip the head advertisement and the state is the unreported video; the third party application determines to send a reminder based on the type of the webpage being the video page which cannot skip the head advertisement and the state not playing video or pausing playing video;
the apparatus further comprises:
the page display module is used for displaying a setting page;
the setting acquisition module is used for acquiring the type of the webpage which is set in the setting page and needs to send out a prompt when reloading and the corresponding characteristics;
And a setting adding module, configured to add a correspondence between the type and the feature set in the setting page to the preset table.
6. The apparatus of claim 5, wherein the information of the web page comprises: the uniform location resource identifier (URL) of the webpage and/or the content of the webpage.
7. The apparatus of claim 6, wherein the type determination module is configured to:
extracting the characteristics of the webpage from the information of the webpage;
searching a preset corresponding relation, and obtaining a type corresponding to the characteristic of the webpage as the type of the webpage, wherein the preset corresponding relation comprises the corresponding relation between the characteristic and the type.
8. The device of any one of claims 5 to 7, wherein the reminder popup further comprises: the first control and the second control;
the apparatus further comprises: a processing module for:
reloading the webpage after acquiring a trigger signal corresponding to the first control;
or,
and after the trigger signal corresponding to the second control is acquired, not reloading the webpage.
9. A computer device comprising a processor and a memory, the memory having stored therein a computer program that is loaded and executed by the processor to implement the method of refreshing web pages of any one of claims 1 to 4.
10. A computer readable storage medium having stored therein a computer program, the computer program being loaded and executed by a processor to implement the method of refreshing web pages of any one of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710373274.9A CN108932243B (en) | 2017-05-24 | 2017-05-24 | Method and device for refreshing webpage |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710373274.9A CN108932243B (en) | 2017-05-24 | 2017-05-24 | Method and device for refreshing webpage |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108932243A CN108932243A (en) | 2018-12-04 |
| CN108932243B true CN108932243B (en) | 2023-05-16 |
Family
ID=64450409
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710373274.9A Active CN108932243B (en) | 2017-05-24 | 2017-05-24 | Method and device for refreshing webpage |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108932243B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110334299B (en) * | 2019-06-27 | 2023-01-06 | 上海淇馥信息技术有限公司 | Popup window display method and device based on address bar monitoring and electronic equipment |
| CN112765508A (en) * | 2021-01-27 | 2021-05-07 | 维沃移动通信有限公司 | Information display method and device and electronic equipment |
| CN113157952B (en) * | 2021-04-29 | 2024-06-21 | 北京达佳互联信息技术有限公司 | Information display method, device, terminal and server |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102999636A (en) * | 2012-12-19 | 2013-03-27 | 北京奇虎科技有限公司 | Method and browser for carrying out interception treatment on popup window in webpage |
| CN103577479A (en) * | 2012-08-06 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Web page content displaying method and system |
| CN104035931A (en) * | 2013-03-05 | 2014-09-10 | 联想(北京)有限公司 | Prompting method, system and electronic device |
| CN104809125A (en) * | 2014-01-24 | 2015-07-29 | 腾讯科技(深圳)有限公司 | Method and device for identifying webpage categories |
| CN105893624A (en) * | 2016-04-29 | 2016-08-24 | 珠海市魅族科技有限公司 | Method and system for displaying data |
-
2017
- 2017-05-24 CN CN201710373274.9A patent/CN108932243B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577479A (en) * | 2012-08-06 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Web page content displaying method and system |
| CN102999636A (en) * | 2012-12-19 | 2013-03-27 | 北京奇虎科技有限公司 | Method and browser for carrying out interception treatment on popup window in webpage |
| CN104035931A (en) * | 2013-03-05 | 2014-09-10 | 联想(北京)有限公司 | Prompting method, system and electronic device |
| CN104809125A (en) * | 2014-01-24 | 2015-07-29 | 腾讯科技(深圳)有限公司 | Method and device for identifying webpage categories |
| CN105893624A (en) * | 2016-04-29 | 2016-08-24 | 珠海市魅族科技有限公司 | Method and system for displaying data |
Non-Patent Citations (1)
| Title |
|---|
| "页面刷新或关闭前警告";忄去;《https://www.cnblogs.com/-------perfect/p/4215365.html》;20150110;第1页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108932243A (en) | 2018-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11003331B2 (en) | Screen capturing method and terminal, and screenshot reading method and terminal | |
| US10084729B2 (en) | Apparatuses and methods for web page sharing | |
| CN104965842B (en) | Method and apparatus are recommended in search | |
| CN105979312B (en) | Information sharing method and device | |
| CN105740263B (en) | Page display method and device | |
| CN104066009B (en) | program identification method, device, terminal, server and system | |
| WO2015062462A1 (en) | Matching and broadcasting people-to-search | |
| WO2015027823A1 (en) | Method, binding server, terminal, and system for binding multiple terminals | |
| JP6910300B2 (en) | A method for displaying chat history records and a device for displaying chat history records | |
| CN107436948B (en) | File searching method and device and terminal | |
| WO2018196588A1 (en) | Information sharing method, apparatus and system | |
| WO2014206037A1 (en) | Apparatuses and methods for web page sharing | |
| CN108038244B (en) | Method and device for displaying cover of work by utilizing widget and mobile terminal | |
| CN104111979A (en) | Search recommendation method and device | |
| US9565142B2 (en) | Instant messaging system and method | |
| JP2018521547A (en) | Method, apparatus and system for presenting information | |
| US12438834B2 (en) | Service sharing method and system, and electronic device | |
| CN108932243B (en) | Method and device for refreshing webpage | |
| WO2015032284A1 (en) | Method, terminal device, and system for instant messaging | |
| CN107529133A (en) | Data transmission method, device, storage medium and computer equipment | |
| CN108563712B (en) | Webpage picture viewing method and device and storage equipment | |
| CN117540048A (en) | Information display method and device, electronic equipment and storage medium | |
| US20180260847A1 (en) | Information display method, apparatus, and system | |
| CN116501428A (en) | Information display method and device, electronic equipment and storage medium | |
| CN112818143B (en) | Page display method and device, electronic equipment and storage medium |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |