The present disclosure relates to computer technologies, and more particularly, to a method and a device for switching a webpage in a browser.
Accompanying with developments of computer technologies and information technologies, in order to meet requirements of users, each Application (APP), which may be installed on an electronic terminal, particularly on a mobile electronic terminal, has been developed rapidly, such that the browser is faced with unprecedented challenges, in which the browser is taken as an important entry for an electronic terminal to access a network. In order to meet more requirements of users, further improvements have been made for a browser. Current browser may also provide some functions of an original APP, e.g., the same reading functions and experience of a news client APP, a novel client APP are provided by a browser. However, foregoing browser may only switch webpages browsed in the same scene, by moving forward or backward. When a user expects to switch to a webpage of a previously browsed other scene from a webpage of a current scene, the user needs to re-open the webpage of other scene and check the webpage, which brings inconveniences to the user, thereby affecting experience effects of the user.
In view of above, the present disclosure provides a method and a device for switching webpages in a browser, which are easily to switch browsed webpages forward and backward in many scenes.
An embodiment of the present disclosure provides a method for switching webpages in a browser, including:
recording a webpage browsed by a user;
receiving an operation for triggering a page switching function from the user;
determining whether there is an adjacent page of current page in current scene, wherein the adjacent page corresponds to the operation;
when determining that there is the adjacent page of current page in current scene, displaying the adjacent page;
when determining that there is no adjacent page of current page in current scene, further determining whether there is an adjacent scene corresponding to the operation of current scene;
when determining that there is the adjacent scene of current scene, displaying an adjacent page of current scene in the adjacent scene; and,
when determining that there is no adjacent scene of current scene, determining that the operation for triggering the page switching function is invalid.
An embodiment of the present disclosure provides a webpage switching device in a browser, at least including a processor and a memory, wherein the memory stores a browse recording module, a receiving module, an adjacent-page determining module, a first display module, an adjacent-scene determining module and a second display module, when being executed by the processor,
the browse recording module is configured to record a webpage browsed by a user;
the receiving module is configured to receive an operation for triggering a page switching function from the user;
the adjacent-page determining module is configured to determine whether there is an adjacent page of current page in current scene, wherein the adjacent page corresponds to the operation;
when the adjacent-page determining module determines that there is the adjacent page of current page in current scene, the first display module is configured to display the adjacent page;
the adjacent-scene determining module is configured to determine whether there is an adjacent scene corresponding to the operation of current scene, and when determining that there is no adjacent scene of current scene, further determine that the operation for triggering the page switching function is invalid;
when the adjacent-scene determining module determines that there is the adjacent scene of current scene, the second display module is configured to display an adjacent page of current scene in the adjacent scene.
An embodiment of the present disclosure also provides a non-transitory computer storage medium, which stores a computer program, wherein the computer program is configured to:
record a webpage browsed by a user;
receive an operation for triggering a page switching function from the user;
determine whether there is an adjacent page of current page in current scene, wherein the adjacent page corresponds to the operation;
when determining that there is the adjacent page of current page in current scene, display the adjacent page;
when determining that there is no adjacent page of current page in current scene, further determine whether there is an adjacent scene corresponding to the operation of current scene;
when determining that there is the adjacent scene of current scene, display an adjacent page of current scene in the adjacent scene; and,
when determining that there is no adjacent scene of current scene, determine that the operation for triggering the page switching function is invalid.
To make foregoing and other objectives, features and advantages of the present disclosure more apparent, detailed descriptions will be provided in the following, accompanying with preferred embodiments and attached figures.
To further describe technical means adopted by the present disclosure for implementing a predetermined objective, and effects thereof, detailed descriptions about specific implementation modes, structures, characteristics and effects of the present disclosure will be provided in the following, accompanying with attached figures and preferred embodiments.
Persons having ordinary skill in the art may understand that, compared with the processor 102, the remaining components belong to peripherals. The processor 102 is coupled with these peripherals via multiple peripheral interfaces 108. The peripheral interface 108 may be implemented based on the following standards, Universal Asynchronous Receiver/Transmitter (UART), General Purpose Input Output (GPIO), Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C), which are not limited to foregoing standards. In some examples, the peripheral interface 108 may only include a bus. In other examples, the peripheral interface 108 may further include other components, for example, one or more controllers, e.g., a display controller for connecting a Liquid Crystal Display (LCD) panel, or the memory controller 106 for connecting the memory. In addition, these controllers may also be separated from the peripheral interface 108, and integrated into the processor 102 or a corresponding peripheral.
The memory 104 may be configured to store a software program and a module, e.g., program instructions/modules corresponding to a webpage switching method/device in a browser in the embodiments of the present disclosure. The processor 102 executes the software program and modules stored in the memory 104, so as to execute each functional application and data processing, that is, implement foregoing webpage switching method in the browser. The memory 104 may include a high-speed Random Access Memory (RAM), and also a non-transitory memory, e.g., one or more magnetic storage devices, a flash memory, or other non-transitory solid-state memory. In some examples, the memory 104 may further include memories, which are remotely set compared with the processor 102. These remote memories may be connected to the electronic terminal 100 via a network. Examples of foregoing network may include, but are not limited to, the Internet, an Intranet, a Local Area Network (LAN), a mobile communication network, and a combination thereof.
The RF module 110 is configured to receive and transmit an electromagnetic wave, implement mutual conversion of an electromagnetic wave and an electronic signal, so as to communicate with a communication network or communicate with another device. The RF module 110 may include each existing circuit component, which is configured to execute these functions, e.g., an antenna, a RF transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identification Module (SIM) card, a memory, and so on. The RF module 110 may communicate with each network, such as, the Internet, an Intranet, a wireless network, or communicate with another device via a wireless network. Foregoing wireless network may include a cellular telephone network, a wireless LAN or a Metropolitan Area Network (MAN). Foregoing wireless network may adopt various communication standards, protocols and technologies, including, but are not limited to, a Global System for Mobile Communication (GSM), an Enhanced Data GSM Environment (EDGE), a wideband code division multiple access (W-CDMA), a Code Division Multiple Access (CDMA), a time division multiple access (TDMA), a Wireless, Fidelity (WiFi) (e.g., IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and/or IEEE 802.11n), a Voice Over Internet Protocol (VoIP), a Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for use in mail, an Instant Messaging (IM) and short messages, and any other appropriate communication protocols, even protocols not developed currently.
The network module 112 is configured to receive and transmit a network signal. Foregoing network signal may include a wireless signal, or a wired signal. In an example, foregoing network signal may be WiFi signal. Since working frequency of WiFi is also within an RF band, at this time, the network module and the RF module 110 may include a similar hardware structure, that is, may include a component, such as, an antenna, a RF transceiver, a digital signal processor, an encryption/decryption chip. In an example, foregoing network signal may be a wired network signal. At this time, the network module 112 may include components, such as, a processor, a RAM, a converter, a crystal oscillator.
An example of the sensor 114 includes, but is not limited to, a light sensor, an operating sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may sense light and shade of ambient light. Subsequently, some modules executed by the processor 102 may automatically adjust display output, by utilizing the output of the ambient light sensor. When the electronic terminal 100 is moved to the ear, the proximity sensor may turn off the display output. As one kind of a motion sensor, a gravitational acceleration sensor senses the magnitude of the acceleration in all directions (generally three axes). When a mobile phone is static, the gravitational acceleration sensor may sense the magnitude and direction of gravity. The gravitational acceleration sensor may further identify an application of a mobile phone's gesture (e.g., switch the screen vertically, a related game, a magnetometer gesture calibration), a vibration recognition related function (e.g., pedometer, percussion), and so on. Other sensors configurable by the electronic terminal 100, such as, a gyroscope, a barometer, a hygrometer, a thermometer, are not repeated here.
The input module 116 may be configured to receive input character information, and generate a signal input of a keyboard, a mouse, an action bar, optics or a trackball, which is related with a user setting and a function control. Specifically, the input module 116 may include buttons and touch surfaces. For example, the buttons may include a character button, which may input a character, and a control button, which may trigger a control function. Examples of the control button include “return to main screen” button, power on/off button, camera button, and so on. The touch surface may collect a touch operation of a user on or around the touch surface (e.g., an operation of a user on or around the touch surface 109, by using a finger, a touch-pen, or any appropriate object or attachment), and drive a corresponding connection device according to a preset program. Optional, the touch surface may include two parts, e.g., a touch sensing device and a touch controller. The touch sensing device senses a touch azimuth of a user, senses a signal brought by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch sensing device, converts it into contact coordinates, transmits the contact coordinates to the processor 102, receives a command from the processor 102, and executes the command. In addition, the touch surface may also be implemented with multiple types, such as, resistance-type, capacitive-type, infrared, and surface acoustic waves. In addition to the touch surface, the input module 116 may also include other input devices. Foregoing other input devices include, but are not limited to, at least one of: a physical keyboard, a trackball, a mouse, an action bar.
The display module 118 is configured to display information input by a user, information provided for the user, and each Graphical User Interface (GUI) of the electronic terminal 100. These GUIs may be constituted by graphic, text, icon, video or any combination thereof. In an example, the display module 118 includes a display panel. For example, the display panel may be a LCD, an Organic Light-Emitting Diode Display (OLED) display panel, an Electro-Phoretic Display (EPD), and so on. Furthermore, the touch surface may be set on the display panel, so as to form a whole with the display panel. In some other embodiments, the display module 118 may further include a display device of another type, e.g., a projection display device. Compared with a general display panel, the projection display device needs to include some projection components, e.g., a lens group.
Foregoing software program and module include: an Operating System (OS) and a webpage switching module. For example, the OS may be LINUX, UNIX, WINDOWS, or a mobile OS, such as, Android, IOS, which may include various software components, and/or, drives, for managing a system task (e.g., a memory management, a storage device control, a power management, and so on), and communicate with various hardware or software components, so as to provide a running environment of other software components. The webpage switching module is operating on the basis of OS, and is configured to switch a webpage, when the webpage is browsed by a browser in the electronic terminal 100.
The embodiment provides a webpage switching method in a browser, which may be applied to an electronic terminal 100. As shown in
In block S101, a webpage browsed by a user is recorded.
With reference to
The scene S may be a browsing scene of a home page, which is configured to provide a website navigation function for a user. The scene WK may be a page browsing scene, which is configured to provide a browsing page for a user as in a traditional browser.
The scene R may be a news-reading browsing scene, which is configured to provide a browsing page and reading experience for a user as in a news client APP. Specifically, different scenes refer to applications of different functions.
In block S102, an operation for triggering a page switching function is received from the user.
The page switching function includes a forward function and a backward function. In an example, the electronic terminal 100 receives a click from a user on a forward view button “>”, or a backward view button “<”, which is located on the upper left corner of a page. When a user clicks the forward view button “>”, it denotes to trigger a forward function. When a user clicks the backward view button “<”, it denotes to trigger a backward function. It may be understood that, the forward view button or backward view button is clicked, so as to view the browsed webpages, which are recorded.
In block S103, it is determined that whether there is an adjacent page corresponding to the operation of current page in current scene.
Specifically, when receiving an operation for triggering a forward function from the user, it is determined that whether there is a subsequent page of current page in current scene, that is, among the recorded webpages, which are browsed by the user, a next page of current page in current scene; when receiving an operation for triggering a backward function from the user, it is determined that whether there is a previous page of current page in current scene, that is, among the recorded webpages, which are browsed by the user, the previous page of current page in current scene. Adjacent pages of current page include a previous page and a next page of current page. An adjacent page of current page and current page may belong to the same scene, or belong to different scenes. For example, among the recorded six webpages of s, A, B, C, d, e, which are browsed by the user, adjacent webpages A and C of webpage B and webpage B belong to scene WK. The adjacent webpage of webpage d includes C and e. Webpages C and d respectively belong to different scenes WK and R. Webpages d and e belong to the same scene R.
In block S104, it is determined that whether there is an adjacent scene corresponding to the operation of current scene.
Specifically, when receiving an operation for triggering a forward function from the user, it is determined that whether there is a subsequent scene of current scene, that is, among recorded different scenes, to which webpages browsed by the user belong, a next scene of current scene; when receiving an operation for triggering a backward function from the user, it is determined that whether there is a previous scene of current scene, that is, among recorded different scenes, to which webpages browsed by the user belong, the previous scene of current scene. The adjacent scene of current scene includes a previous scene and a subsequent scene of current scene. For example, since there is no previous scene for scene S, the adjacent scene of scene S refers to the subsequent scene thereof, which is scene WK. Since there are previous scene and subsequent scene for scene WK, the adjacent scene of scene WK refers to scene S and scene R. Since there is no subsequent scene for scene R, the adjacent scene of scene R refers to the previous scene thereof, which is scene
WK.
In block S105, an adjacent page of current scene in the adjacent scene is displayed.
Specifically, when an operation for triggering a forward function is received from the user, and it is determined that there is a subsequent scene for current scene, the first page of the subsequent scene is displayed; when an operation for triggering a backward function is received from the user, and it is determined that there is a previous scene for current scene, the last page of the previous scene is displayed.
In block S106, the adjacent page is displayed.
Specifically, when an operation for triggering a forward function is received from the user, and it is determined that there is a subsequent page of current page in current scene, the subsequent page of current page in current scene is displayed; when an operation for triggering a backward function is received from the user, and it is determined that there is a previous page for current page in current scene, the previous page of current page in current scene is displayed.
In block S107, current page is continuously displayed.
When the determinations in blocks S103 and S104 are both no, it is determined that the operation for triggering page switching function is invalid, and current page is continuously displayed.
On the basis of the method in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is an adjacent page of current page in current scene, in which the adjacent page corresponds to the operation for triggering a page switching function of the user, the electronic terminal 100 further determines whether there is an adjacent scene corresponding to the operation in current scene. When it is determined that there is no adjacent page of current page in current scene, while there is an adjacent scene of current scene, a page in the adjacent scene is displayed, while it is not necessary to re-open a new page in the adjacent scene. Thus, by adopting such method, the experience for browsing a page by a user is improved, and operations for re-starting a new page by a user may be reduced, thereby improving browsing efficiency.
Detailed descriptions about switching webpages in a browser in the present disclosure are provided in the following, accompanying with a specific operation in a specific application scene.
An embodiment provides a method for switching webpages in a browser, which is applied to an electronic terminal 100. The embodiment is similar to previous embodiments. The difference is as follows. As shown in
In block S201, a webpage browsed by a user is recorded.
In the block, the user may open a browser to browse webpages in the electronic terminal 100. The electronic terminal 100 records webpages browsed by the user. The electronic terminal 100 may be a mobile electronic terminal.
With reference to
The scene S may be a browsing scene of a home page, which is configured to provide a website navigation function for a user. The scene WK may be a page browsing scene, which is configured to provide a browsing page for a user as in a traditional browser. The scene R may be a news-reading browsing scene, which may provide a browsing page and reading experience for a user, as a news client APP.
In block S202, an operation for triggering a forward function is received from the user.
In an example, the electronic terminal 100 receives a click from a user on a forward view button “>”, which is located on the upper left corner of a page. It may be understood that, recorded webpages, which are browsed, may be viewed by clicking on such forward view button. For example, descriptions are provided by referring to the example shown in
In block S203, it is determined that whether there is a subsequent page of current page in current scene.
In the block, when the electronic terminal 100 receives an operation for triggering a forward function from the user, it is determined that whether there is a subsequent page of current page in current scene. When it is determined that there is no subsequent page of current page in current scene, proceed with block S204; otherwise, proceed with block S206.
In an example, pages are viewed by using a page switching function. Descriptions are provided by referring to the example in
In another example, pages are viewed by using the page switching function. Descriptions are still provided by referring to the example in
In block S204, it is determined that whether there is a subsequent scene of current scene.
In the block, when the electronic terminal 100 determines that there is no subsequent page of current page in current scene, it is further determined that whether there is a subsequent scene of current scene. When determining that there is a subsequent scene of current scene, proceed with block S205; otherwise, proceed with block S207.
As shown in
In another example, if current scene is scene R, when the currently displayed page is page e, since there is no subsequent scene of scene R, in block S204 of the example, it is determined that there is no subsequent scene, proceed with block S207.
In block S205, the first page in the subsequent scene is displayed.
As shown in
In block S206, the subsequent page of current page in current scene is displayed.
As shown in
In block S207, current page is continuously displayed.
In the block, when determining that there is no subsequent page of current page in current scene, and there is no subsequent scene of current scene, the electronic terminal 100 determines that the operation for triggering a forward function received from the user is invalid, and displays current page continuously.
As shown in
With reference to
In an example, in blocks S203 and S204, a method of canGoForward may be adopted to determine whether forward is available. When the determination in block S203, or S204 is yes, a result returned by the method canGoForward is yes, and a method goForward may be used to implement a forward operation, and then switch to a target page; otherwise, the result returned by the method canGoForward is no, current page is continuously displayed.
Furthermore,
On the basis of the method in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is a subsequent page of current page in current scene, but also determines whether there is a subsequent scene of current scene. When determining that there is no subsequent page of current page in current scene, and there is a subsequent scene of current scene, the electronic terminal 100 displays a page in the subsequent scene, while it is not necessary to re-open a new page in the subsequent scene. Thus, by adopting the method, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user may be reduced, thereby improving browsing efficiency.
An embodiment provides a webpage switching method in a browser. The embodiment is similar to the embodiment in
In block S301, webpages browsed by a user are recorded.
In the block, a user may start a browser in an electronic terminal 100, and browse webpages. The electronic terminal 100 records webpages, which are browsed by the user. The electronic terminal 100 may be a mobile electronic terminal.
In block S302, an operation for triggering a backward function is received from the user.
In an example, the electronic terminal 100 receives from the user a click on a backward view button “<”, which is located on the upper left corner of a page. It may be understood that, recorded webpages, which are browsed, may be viewed by clicking on the backward view button. For example, descriptions are provided by using the example in
In block S303, it is determined that whether there is a previous page of current page in current scene.
In the block, when receiving an operation for triggering a backward function from the user, the electronic terminal 100 determines whether there is a previous page of current page in current scene, when determining that there is no previous page of current page in current scene, proceed with block S304; otherwise, proceed with block S306.
In an example, pages are viewed by using a page switching function. Descriptions are provided by using the example in
S306.
In another example, pages are viewed by using the page switching function. Descriptions are still provided, by using the example in
In block S304, it is determined that whether there is a previous scene of current scene.
In the block, when determining that there is no previous page of current page in current scene, the electronic terminal 100 further determines whether there is a previous scene of current scene; when determining there is a previous scene of current scene, proceed with block S305; otherwise, proceed with block S307.
As shown in
In another example, when current scene is scene S, if the currently displayed page is page s, since there is no previous scene for scene S, in the example, the determination in block S304 is that there is no previous scene, proceed with block S307.
In block S305, the last page in the previous scene is displayed.
As shown in
In block S306, the previous page of current page in current scene is displayed.
As shown in
In block S307, current page is continuously displayed.
In the block, when the electronic terminal 100 determines that there is no previous page of current page in current scene, and there is no previous scene for current scene, the electronic terminal 100 determines that the operation for triggering a backward function received from the user is invalid, and continuously displays current page.
As shown in
With reference to
In blocks S303 and S304 of an example, a method of canGoBack may be adopted to determine whether backward is available. When the determination in block S303 or S304 is yes, a result returned by the method of canGoBack is yes, and a method of goBack can be used to implement a backward operation, so as to switch to a target page; otherwise, the result returned by the method of canGoBack is no, current page is continuously displayed.
Furthermore,
On the basis of the method in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is a previous page of current page in current scene, but also determines whether there is a previous scene of current scene. When determining that there is no previous page of current page in current scene, while there is a previous scene of current scene, the electronic terminal 100 displays a page in the previous scene. It is not necessary to re-open a new page in the previous scene. Thus, by adopting the method, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user are reduced, thereby improving browsing efficiency.
An embodiment provides a webpage switching method in a browser. The embodiment is similar to the embodiment of
In block S401, during a process of viewing webpages by using a page switching function, when a new page is started after current page, all the previously recorded pages after current page are deleted.
In the block, during the process of viewing webpages by a user with a page switching function, a new page is started after current page, the electronic terminal 100 deletes all the previously recorded pages after current page. Specifically, when a new page is started in current scene, where current page is located, the electronic terminal 100 deletes all the previously recorded pages after current page in current scene, and deletes previously recorded pages in all the scenes after current scene. When a new page is started in a new scene, the electronic terminal 100 deletes previously recorded pages of all the scenes after current scene.
With reference to
In block S402, a new browsing history is formed.
In the block, a new page is recorded. The new page and previously recorded undeleted browsing pages form a new browsing history together.
As shown in
In the embodiment, when viewing pages of a new browsing history by using a page switching function, in which the new browsing history is formed after inserting a new page, pages may be switched, based on the modes in the embodiments of
An embodiment provides a webpage switching device in a browser, which is applicable to an electronic terminal 100. As shown in
The browse recording module 501 is configured to record a webpage browsed by a user.
The receiving module 502 is configured to receive an operation for triggering a page switching function from the user. The page switching function includes a forward function and a backward function.
The adjacent-page determining module 503 is configured to determine whether there is an adjacent page corresponding to the operation in current scene.
When determining that there is an adjacent page, the adjacent-page determining module 503 is further configured to call the first display module 505; otherwise, the adjacent-page determining module 503 is further configured to call the adjacent-scene determining module 504.
The adjacent-scene determining module 504 is configured to determine whether there is an adjacent scene corresponding to the operation of current scene. When determining that there is no adjacent scene of current scene, the adjacent-scene determining module 504 is further configured to determine that the operation for triggering the page switching function is invalid.
When the adjacent-page determining module 503 determines that there is an adjacent page of current page in current scene, the first display module 505 is configured to display the adjacent page.
When the adjacent-scene determining module 504 determines that there is an adjacent scene of current scene, the second display module 506 is configured to display an adjacent page of current scene in the adjacent scene.
Other details regarding the device in the embodiment may further refer to foregoing method embodiments, which are not repeated here.
On the basis of the device in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is an adjacent page of current page in current scene, in which the adjacent page corresponds to the user's operation for triggering a page switching function, the electronic terminal 100 but also determines whether there is an adjacent scene corresponding to the operation of current scene. When determining that there is no adjacent page of current page in current scene, while there is an adjacent scene of current scene, the electronic terminal 100 further displays a page in the adjacent scene, while it is not necessary to re-open a new page in the adjacent scene. Thus, by adopting such method, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user may be reduced, so as to improve browsing efficiency.
An embodiment provides a webpage switching device in a browser, which is applied to an electronic terminal 100. The electronic terminal 100 may be a mobile electronic terminal. As shown in
The browse recording module 501 is configured to record a webpage browsed by a user.
The first receiving unit 5021 is configured to receive an operation for triggering a forward function from the user.
The first determining unit 5031 is configured to determine whether there is a subsequent page of current page in current scene.
When determining that there is no subsequent page of current page in current scene, the first determining unit 5031 is further configured to call the second determining unit 5041. When determining that there is a subsequent page of current page in current scene, the first determining unit 5031 is further configured to call the first display unit 5051.
When the first determining unit 5031 determines that there is no subsequent page of current page in current scene, the second determining unit 5041 is configured to determine whether there is a subsequent scene of current scene. And when determining that there is no subsequent scene of current scene, the second determining unit 5041 is further configured to determine that the operation for triggering a forward function is invalid.
When determining that there is a subsequent scene of current scene, the second determining unit 5041 is further configured to call the second display unit 5061. When determining that there is no subsequent scene of current scene, the second determining unit 5041 is further configured to determine that the operation for triggering a forward function of the user is invalid, and continuously display current page.
When the first determining unit 5031 determines that there is a subsequent page of current page in current scene, the first display unit 5051 is configured to display the subsequent page.
When the second determining unit 5041 determines that there is a subsequent scene of current scene, the second display unit 5061 is configured to display the first page of the subsequent scene. When the second determining unit 5041 determines that the operation for triggering a forward function is invalid, the second display unit 5061 is further configured to continuously display current page of current scene.
Regarding other details about the device in the embodiment, please refer to foregoing method embodiments, which are not repeated here.
On the basis of the device in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is a subsequent page of current page in current scene, but also determines whether there is a subsequent scene of current scene. When determining that there is no subsequent page of current page in current scene, and there is a subsequent scene of current scene, the electronic terminal 100 displays a page in the subsequent scene. It is not necessary for the electronic terminal 100 to re-open a new page of the subsequent scene. Thus, by adopting the device, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user may be reduced, thereby improving browsing efficiency.
An embodiment provides a webpage switching device in a browser. The device provided by the embodiment is similar to that provided by the embodiment of
The second receiving unit 5022 is configured to receive an operation for triggering a backward function from a user.
The third determining unit 5032 is configured to determine whether there is a previous page of current page in current scene.
When determining that there is no previous page of current page in current scene, the third determining unit 5032 is further configured to call the fourth determining unit 5042. When determining that there is a previous page of current page in current scene, the third determining unit 5032 is further configured to call the third display unit 5052.
When the third determining unit 5032 determines that there is no previous page of current page in current scene, the fourth determining unit 5042 is configured to determine whether there is a previous scene of current scene. When determining that there is no previous scene of current scene, the fourth determining unit 5042 is further configured to determine that the operation for triggering a backward function is invalid.
When determining that there is a previous scene of current scene, the fourth determining unit 5042 is further configured to call the fourth display unit 5062. When determining that there is no previous scene of current scene, and determining that the user's operation for triggering a backward function is invalid, the fourth determining unit 5042 is further configured to continuously display current page.
When the third determining unit 5032 determines that there is a previous page of current page in current scene, the third display unit 5052 is configured to display the previous page.
When the fourth determining unit 5042 determines that there is a previous scene of current scene, the fourth display unit 5062 is configured to display the last page of the previous scene. When the fourth determining unit 5042 determines that the operation for triggering a backward function is invalid, the fourth display unit 5062 is further configured to continuously display current page of current scene.
Regarding other details about the device in the embodiment, please further refer to foregoing method embodiments, which are not repeated here.
On the basis of the device in the embodiment, when switching webpages, the electronic terminal 100 not only determines whether there is a previous page of current page in current scene, but also determines whether there is a previous scene of current scene. When determining that there is no previous page of current page in current scene, while there is a previous scene of current scene, the electronic terminal 100 further displays a page in the previous scene, without the need of re-opening a new page in the previous scene. Thus, by adopting such device, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user may also be reduced, thereby improving browsing efficiency.
An embodiment provides a webpage switching device in a browser, which is similar to the device provided by the embodiment of
During a process of viewing webpages by using a page switching function, the deleting module 601 is configured to start a new page after current page, and delete all the previously recorded pages after current page.
The new-record generating module 602 is configured to generate a new browsing history. Specifically, the new-record generating module 602 is further configured to record a new page, enable the new page and undeleted pages recorded previously to form a new browsing history.
Regarding other details of the device in the embodiment, please further refer to foregoing method embodiments, which are not repeated here.
In the embodiment, when viewing pages of a new browsing history by using a page switching function, in which the new browsing record is formed after inserting a new page, pages may be switched, by using the modes in the embodiments of
The memory 1402 stores a browse recording module 501, a receiving module 502, an adjacent-page determining module 503, an adjacent-scene determining module 504, a first display module 505 and a second display module 506. When being executed by the processor 1401, operations executed by the browse recording module 501, the receiving module 502, the adjacent-page determining module 503, the adjacent-scene determining module 504, the first display module 505, and the second display module 506 are the same as that in the embodiment of
The memory 1502 stores a browse recording module 501, a first receiving unit 5021, a first determining unit 5031, a second determining unit 5041, a first display unit 5051, and a second display unit 5061. When being executed by the processor 1501, operations executed by the browse recording module 501, the first receiving unit 5021, the first determining unit 5031, the second determining unit 5041, the first display unit 5051, and the second display unit 5061 are the same as that in the embodiment of
The memory 1602 stores a browse recording module 501, a second receiving unit 5022, a third determining unit 5032, a fourth determining unit 5042, a third display unit 5052 and a fourth display unit 5062. When being executed by the processor 1601, operations of the browse recording module 501, the second receiving module 5022, the third determining unit 5032, the fourth determining unit 5042, the third display unit 5052, and the fourth display unit 5062 are the same as that in the embodiment of
The memory 1702 stores a deleting module 601 and a new-record generating module 602. When being executed by the processor 1701, operations executed by the deleting module 601 and the new-record generating module 602 are the same as that in the embodiment of
In addition, an embodiment of the present disclosure also provides a computer readable storage medium, which stores computer executable instructions. Foregoing computer readable storage medium may be a non-transitory memory, such as, a Compact Disk (CD), a hard disk, or a flash memory. Foregoing computer executable instructions may be configured to enable a computer, or a similar computing device to complete various operations of foregoing webpage switching method in a browser.
On the basis of the method and the device in foregoing embodiments, when switching webpages, it is detected that whether there is an adjacent page of current page in current scene, in which the adjacent page corresponds to an operation of a user for triggering a page switching function, it is further determined that whether there is an adjacent scene corresponding to the operation of current scene. When determining that there is no adjacent page of current page in current scene, while there is an adjacent scene of current scene, a page in the adjacent scene is displayed. It is not necessary to re-open a new page in the adjacent scene. Thus, experience for browsing a page by a user may be improved, and operations for re-starting a new page by a user may be reduced, thereby improving browsing efficiency.
The foregoing is only preferred embodiments of the present disclosure, which is not for use in limiting the present disclosure. Although the present disclosure has been disclosed by foregoing preferred embodiments, the present disclosure is not limited. Without departing from the range of technical solutions in the present disclosure, persons having ordinary skill in the art may utilize foregoing disclosed technical contents, and implement some equivalent embodiments by adding some similar changes, such as, modifications. Any simple modifications, equivalent amendments and changes made for foregoing embodiments based on the technical essence of the present disclosure, without departing from contents of technical solutions in the present disclosure, should be covered by the technical solutions of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201510432461.0 | Jul 2015 | CN | national |
This application is a continuation of International Application No. PCT/CN2016/085518, filed on Jun. 13, 2016, which claims priority to Chinese Patent Application No. 201510432461.0, entitled “Webpage switching method and apparatus in browser”, filed on Jul. 22, 2015, both of which are incorporated herein by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2016/085518 | Jun 2016 | US |
Child | 15813539 | US |