[go: up one dir, main page]

CN114036428A - Browser backspacing control method, system, equipment and storage medium - Google Patents

Browser backspacing control method, system, equipment and storage medium Download PDF

Info

Publication number
CN114036428A
CN114036428A CN202111425380.XA CN202111425380A CN114036428A CN 114036428 A CN114036428 A CN 114036428A CN 202111425380 A CN202111425380 A CN 202111425380A CN 114036428 A CN114036428 A CN 114036428A
Authority
CN
China
Prior art keywords
browser
function
fallback
queue
rollback
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111425380.XA
Other languages
Chinese (zh)
Inventor
刘强
高俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Yunfeng Technology Co ltd
Original Assignee
Chongqing Yuncheng Internet Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Yuncheng Internet Technology Co Ltd filed Critical Chongqing Yuncheng Internet Technology Co Ltd
Priority to CN202111425380.XA priority Critical patent/CN114036428A/en
Publication of CN114036428A publication Critical patent/CN114036428A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Algebra (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明提供一种浏览器回退控制方法、系统、设备及存储介质,其中,方法包括:初始化浏览器回退控制对象,注册浏览器回退函数,并与回调触发函数绑定;根据所述浏览器回退函数注册浏览器回退控制函数并保存;判断函数队列中是否存在历史回退控制函数,若存在,则移除所述函数队列中的历史回退控制函数,将所述浏览器回退控制函数添加到所述函数队列中;触发所述回调触发函数,根据函数队列中的浏览器回退控制函数,控制浏览器回退。本发明在满足用户常规回退习惯的前提下,能够保留浏览器的临时数据、页面位置和回传数据,提升了用户使用体验。

Figure 202111425380

The present invention provides a browser fallback control method, system, device and storage medium, wherein the method includes: initializing a browser fallback control object, registering a browser fallback function, and binding with the callback trigger function; The browser fallback function registers and saves the browser fallback control function; judges whether there is a historical fallback control function in the function queue, and if so, removes the historical fallback control function in the function queue, and stores the browser fallback control function in the function queue. A rollback control function is added to the function queue; the callback trigger function is triggered, and the browser rollback is controlled according to the browser rollback control function in the function queue. On the premise of satisfying the user's conventional reversion habit, the present invention can retain the temporary data of the browser, the page position and the returned data, thereby improving the user experience.

Figure 202111425380

Description

Browser backspacing control method, system, equipment and storage medium
Technical Field
The present invention relates to the field of browser technologies, and in particular, to a method, a system, a device, and a storage medium for controlling browser rollback.
Background
When a user uses an app or an applet, sometimes a mobile terminal or a browser is operated to carry a return button, the user can return to the previous interface, and the temporary number of the previous interface can be reserved; sometimes, the program is directly exited and the data cannot be stored by operating the mobile terminal or the browser with a return button. Therefore, the user has developed a diversified page returning habit.
When working data statistics or report is performed on an industrial internet mobile terminal, such as an app or an applet, a user often needs to fill in form data with large data volume and complexity. During the filling process, a prompt box may pop up when the data is not in compliance, or the data needs to be selected and selected, and a data selection interface is jumped or popped up. Whether the data selection interface or the prompt pop-up box exits, a user may exit the current pop-up box or interface based on a customary returning mode, but if the operation is wrong, the whole program or app may exit, so that the filled-in form data is cleared, which may not be important for browsing type apps or applets, but for the industrial internet apps in terms of work reports, the use experience of the user is greatly influenced. Therefore, the technical problem to be solved by those skilled in the art is to provide a browser rollback method capable of adapting to all the user habits.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, a system, a device and a storage medium for controlling browser rollback.
A browser backspacing control method comprises the following steps: initializing a browser backspacing control object, registering a browser backspacing function, and binding the browser backspacing function with a callback trigger function; registering and storing a browser backspacing control function according to the browser backspacing function; judging whether a historical backspacing control function exists in a function queue, if so, removing the historical backspacing control function in the function queue, and adding the browser backspacing control function into the function queue; and triggering the callback trigger function, and controlling the browser to retreat according to the browser retreat control function in the function queue.
In one embodiment, the initializing a browser fallback control object, registering a browser fallback function, and binding with a callback trigger function specifically includes: clearing the functions stored in the function queue and registering a browser backspacing function; monitoring the change of a browser history recording interface through a browser object; and binding the browser backspacing function with a callback trigger function.
In one embodiment, the registering and storing a browser fallback control function according to the browser fallback function specifically includes: registering a browser backspacing control function according to the browser backspacing function, and transmitting the browser backspacing control function into a browser; judging whether an incoming browser backspacing control function is registered, if not, storing the browser backspacing control function to a function queue; judging whether the browser backspacing control function controls the backspacing of the browser, if not, pushing an anchor address according to the browser backspacing control function, and controlling the backspacing of the browser through the anchor address.
In one embodiment, the determining whether a historical rollback control function exists in the function queue, and if so, removing the historical rollback control function from the function queue, and adding the browser rollback control function to the function queue specifically includes: transmitting the browser backspacing control function into a browser, and judging whether a historical backspacing control function exists in a function queue; if the function queue has a historical rollback control function, removing the historical rollback control function; judging whether the historical backspacing control function is removed when the function queue is in the function queue, and controlling the backspacing of a browser; and if so, backing off and refreshing, and removing the browser backspacing control function.
In one embodiment, the removing the browser rollback control function specifically includes: finding out subscripts of functions to be removed from the function queues, and judging whether the subscripts are greater than or equal to 0; if the subscript is greater than or equal to 0, the function to be removed exists in the function queue; removing the corresponding function to be removed in the function queue according to the subscript; and removing the anchor point address corresponding to the function to be removed.
In one embodiment, the triggering the callback trigger function, and controlling browser rollback according to a browser rollback control function in a function queue specifically includes: triggering the callback trigger function, and judging whether the function queue is empty or not; if the function queue is not empty, traversing a browser backspacing control function in the function queue, executing the browser backspacing control function, pushing an anchor address, and controlling the browser to backspace according to the anchor address; if the function queue is empty and it is detected that the browser has rolled back, then the anchor address is removed.
In one embodiment, the triggering the callback trigger function, and controlling browser rollback according to a browser rollback control function in a function queue, further includes: detecting whether a user is a manager or not, and returning to the previous page and refreshing when the user is the manager; detecting whether the current interface is a preset interface or not, whether the current time is within a preset time period or not, and returning to the previous page and refreshing when the current interface is a non-preset interface or the current time is not within the preset time period; and returning to the previous page and refreshing when detecting that the user continuously clicks the browser backspace control for at least 3 seconds.
A browser rollback control system, comprising: the backspacing function registration module is used for initializing a backspacing control object of the browser, registering a backspacing function of the browser and binding the backspacing function with the backspacing trigger function; a rollback control function registration module, configured to register and store a browser rollback control function according to the browser rollback function; a rollback control function adding module, configured to determine whether a historical rollback control function exists in a function queue, and if the historical rollback control function exists, remove the historical rollback control function in the function queue and add the browser rollback control function to the function queue; and the browser backspacing control module is used for triggering the callback trigger function and controlling the backspacing of the browser according to the browser backspacing control function in the function queue.
An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of a browser rollback control method as described in the above embodiments when executing the program.
A storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a browser rollback control method as described in the various embodiments above.
Compared with the prior art, the invention has the advantages and beneficial effects that: the invention provides a browser backspacing control method meeting the use habits of all users, so that the user can not directly quit the applet and the app no matter which quit mode is used, the conventional operation habits of the user are met, backspacing of the browser for retaining temporary data, page positions and returned data can be realized, and the use experience of the user is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for controlling browser rollback in an embodiment;
FIG. 2 is a diagram illustrating a browser rollback control system according to an embodiment;
fig. 3 is a schematic diagram of the internal structure of the apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings by way of specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The method and the device are suitable for backspacing control of the browser, and the situation that the previous page data is refreshed due to the adoption of a traditional browser backspacing mode is avoided. According to the method and the device, a browser backspacing control object is initialized, functions stored in a function queue are cleared, a browser backspacing function is registered and bound with a callback trigger function, the change of a browser historical record interface is monitored through the browser object, whether the browser has operations of backspacing, returning or the last page is judged, and therefore backspacing of the browser is controlled in time.
Registering a browser backspacing control function according to a browser backspacing function, transmitting the browser backspacing control function into a browser, judging whether the browser backspacing control function is registered or not, if not, storing the browser backspacing control function into a function queue, judging whether the browser backspacing control function controls the browser to backspace or not, if not, pushing an anchor address according to the browser backspacing function, and skipping to the corresponding anchor address by the browser to realize the backspace of the previous page data.
Judging whether a historical backspacing function exists in the function queue, if so, removing the function queue to avoid the interference of the historical backspacing control function on the backspacing operation of the current browser; if the browser is removed and the browser is successfully backed, backing and refreshing are carried out, and the browser backing control function is removed; when a callback trigger function is triggered, judging whether a function queue is empty or not, if the function queue is not empty, traversing a browser rollback control function in the function queue, executing the browser rollback control function, pushing an anchor point address, namely a pre-stored previous page reserved with corresponding page data, skipping to the anchor point address by the browser, realizing the rollback of the previous page data reserved by the browser, meeting the conventional operation habit of a user, and if the function queue is empty and the browser rolls back, backing and refreshing, removing the anchor point address, thereby reducing the memory occupation of the browser.
In addition, when detecting that the user is a manager, or the current interface is a non-preset interface, or the current time is not in a preset time period, or detecting that the user continuously clicks a browser backspacing control for at least three seconds, the previous page is returned and refreshed in a conventional backspacing mode, so that the random switching between conventional backspacing and the backspacing of the application is realized, and the user requirements are met. The method and the device for closing the popup window meet the conventional operation habit of the user, the browser is enabled to keep the temporary data, the page position and the returned data, the user use experience is improved, meanwhile, the popup window can be closed through the returning operation of the browser, and the user is prevented from exiting the caused misoperation in a conventional mode.
In one embodiment, as shown in fig. 1, there is provided a browser rollback control method, including the steps of:
step S101, initializing a browser backspacing control object, registering a browser backspacing function, and binding with a callback trigger function.
Specifically, in order to ensure that the browser can store the temporary filling data, the page position and the return data of the previous page when the browser backs, before the browser backs, a browser backspacing control object is initialized, a browser backspacing function is re-registered, repeated registration of a callback is prevented, and the browser backspacing function and a callback trigger function are bound, so that the browser backspacing function can be started by triggering the callback trigger function.
And step S102, registering and storing the browser backspace control function according to the browser backspace function.
Specifically, according to the browser backspacing function, the browser backspacing control function is re-registered, whether the browser backspacing control function is registered or not is judged, if the browser backspacing control function is not registered, the browser backspacing control function is stored in the function queue, backspacing of the browser is controlled through the browser backspacing control function, and meanwhile, the fact that the browser can return to a previously filled position after backspacing, and temporarily filled data and returned data are stored can be guaranteed.
Step S103, judging whether a historical backspacing control function exists in the function queue, if so, removing the historical backspacing control function in the function queue, and adding the browser backspacing control function into the function queue.
Specifically, in order to avoid the situation that the current page rollback control is interfered due to the existence of the historical rollback control function in the function queue, it is necessary to determine whether the historical rollback control function exists in the function queue, and if the historical rollback control function exists in the function queue, the historical rollback function is removed from the function queue, and the registered browser rollback control function is added to the function queue, so that the rollback of the browser can be controlled according to the browser rollback control function.
And step S104, triggering a callback trigger function, and controlling the browser to retreat according to the browser retreat control function in the function queue.
Specifically, when a browser rollback request is initiated and a callback trigger function is triggered, the browser is controlled to return to the previous page under the condition that the filling position of the previous page, the temporary filling data and the return data are saved according to the browser rollback control function stored in the function queue, and the rollback of the browser is achieved.
In the embodiment, a browser rollback control object is initialized, a browser rollback function is registered and bound with a callback trigger function, a browser rollback control function is registered and stored according to the browser rollback function, whether a historical rollback function exists in a function queue is judged, if the historical rollback function exists in the function queue is removed, the browser rollback control function is added into the function queue, the callback trigger function is triggered, and the browser rollback is controlled according to the browser rollback control function in the function queue, so that the browser can keep temporary data, page positions and rollback of returned data through conventional habit operation of a user, meanwhile, closing of a popup window can be realized through return operation of the browser, error operation caused by the user through a conventional exit mode is avoided, and user experience is improved.
Wherein, step S101 specifically includes: clearing the functions stored in the function queue and registering a browser backspacing function; monitoring the change of a browser history recording interface through a browser object; and binding the browser backspacing function with the callback trigger function.
Specifically, before controlling browser rollback, emptying functions stored in a function queue, re-registering browser rollback functions, monitoring changes of a history interface popstate through a browser object window, if changes of the history interface popstate are monitored, indicating that the browser has a return operation, a rollback operation or a previous page operation, triggering the callback trigger function when the operations exist, and executing the browser rollback functions after the callback trigger function is triggered due to the fact that the browser rollback functions are bound with the callback trigger functions.
Wherein, step S102 specifically includes: registering a browser backspacing control function according to the browser backspacing function, transmitting the browser backspacing control function into a browser, judging whether the transmitted browser backspacing control function is registered, and if the transmitted browser backspacing control function is not registered, storing the browser backspacing control function into a function queue; judging whether the browser backspacing control function controls the backspacing of the browser, if not, pushing an anchor address according to the browser backspacing control function, and controlling the backspacing of the browser through the anchor address.
Specifically, a browser backspacing control function is registered according to the browser backspacing function, the browser backspacing control function is transmitted to the browser, whether the transmitted browser is registered or not is judged, and if the transmitted browser is registered, the current operation is ended; if not, saving the browser rollback control function in the function queue, judging whether the browser rollback control function controls the browser to rollback or not, and if so, ending the operation; if the browser is not controlled to back, pushing an anchor address through a browser back control function, and controlling the browser to back through the anchor address. When the page is operated, the current page is marked with an anchor point, and an anchor point address is obtained; and after the backspacing trigger function is triggered, executing a browser backspacing control function, pushing an anchor address through the browser backspacing control function, skipping to the anchor address, realizing browser backspacing, and saving the previously retained data and page position.
When judging whether the browser rollback control function controls the browser to rollback or not, the anchor address of the current page can be read through the window.
Wherein, step S103 specifically includes: transmitting a browser backspacing control function into a browser, and judging whether a historical backspacing control function exists in a function queue; if the historical backspacing control function exists in the function queue, removing the historical backspacing control function; judging whether the historical backspacing control function is removed from the function queue and controlling the backspacing of the browser; if yes, backing off and refreshing, and removing the browser backspacing control function.
Specifically, after a browser backspacing control function is transmitted into a browser, whether a historical backspacing function exists in a function queue is judged, in order to avoid interference of the historical backspacing function on a current backspacing operation, when the historical backspacing control function exists in the function queue, the corresponding historical backspacing control function needs to be removed, and therefore backspacing of the browser can be controlled through the transmitted browser backspacing control function. After the historical backspacing control function is removed, whether the function queue removes the historical backspacing control function or not is detected, whether the browser backspacing is controlled or not is detected, if the function queue removes the historical backspacing control function and controls the browser to backspace, a page is backed by a method of window.
The method for removing the browser backspacing control function specifically comprises the following steps: finding out subscripts of functions to be removed from the function queues, and judging whether the subscripts are greater than or equal to 0; if the subscript is greater than or equal to 0, the function to be removed exists in the function queue; removing the corresponding function to be removed in the function queue according to the subscript; and removing the anchor point address corresponding to the function to be removed.
Specifically, when a browser rollback control function is moved, a subscript of a function to be removed needs to be found out from a function queue, the function to be removed is the browser rollback control function which controls the browser to realize rollback, whether the subscript is greater than or equal to 0 is judged, when the subscript is greater than or equal to 0, the function to be removed exists in the function queue, the corresponding function to be removed is removed from the function queue through the subscript, an anchor address corresponding to the function to be removed is removed, interference on next browser rollback is avoided, browser storage can be cleaned at the same time, and jamming caused by too much storage occupation of the browser is avoided.
Wherein, step S104 specifically includes: triggering and calling back a trigger function, and judging whether a function queue is empty or not; if the function queue is not empty, traversing the browser rollback control function in the function queue, executing the browser rollback control function, pushing an anchor address, and controlling the browser to rollback according to the anchor address; if the function queue is empty and it is detected that the browser has rolled back, then the anchor address is removed.
Specifically, when browser rollback is needed, a conventional browser returning operation is performed, a callback trigger function is triggered, whether a current function queue is empty or not is judged, when the function queue is not empty, browser rollback control functions in the function queue are traversed, the browser rollback control functions are sequentially executed, an anchor address is pushed again, and the browser skips according to the anchor address to realize browser rollback; after the function queue is empty and it is detected that the browser has been controlled to implement a fallback, it is backed and refreshed by the method of window.
Specifically, after the callback function is triggered, if the function queue is detected to be empty and the browser is backed, the browser is indicated to be backed by the browser back control function, and the browser is backed by one page through window.
Wherein, step S104 further includes: detecting whether a user is a manager or not, and returning to the previous page and refreshing when the user is the manager; detecting whether the current interface is a preset interface or not, whether the current time is within a preset time period or not, and returning to the previous page and refreshing when the current interface is a non-preset interface or the current time is not within the preset time period; and returning to the previous page and refreshing when detecting that the user continuously clicks the browser backspace control for at least 3 seconds.
Specifically, after the callback function is triggered, whether the current user is a manager or not is detected through the mark of the terminal user, and when the user is the manager, the browser backspacing control method is not adopted, but the conventional browser backspacing control is adopted, namely the previous page is returned and refreshed. When browser backspacing control is carried out, the browser backspacing control method can be set on a page needing form filling, and a conventional backspacing method is adopted on a conventional page, so that when the current page is detected to be a non-preset interface, the previous page is directly returned and refreshed, and similarly, when the current time is detected to be in a non-preset time period, the conventional backspacing method is also adopted. In addition, when the situation that the user continuously clicks the browser backspacing control for at least three seconds is detected, the previous page is returned and refreshed by adopting a conventional backspacing method, so that the random switching between the backspacing method and the conventional backspacing method is realized, and the requirements of the user are met.
In this embodiment, the monitoring of the browser rollback request is realized through the pop state of the HTML5, and meanwhile, the rollback control of the browser for reserving the original data is realized through the HTML anchor point. Firstly, the page does not trigger refreshing in an anchor point jumping mode, so that the previous data is processed; secondly, through anchor jumping, anchor connection can occupy a url history, and through browser rollback, anchor connection can be rolled back. The browser rollback control is set, the rollback of the browser is controlled by pushing an anchor connection, the browser is rolled back to the browser quality of the browser from the anchor connection, the roll-back of the browser is triggered to roll back and monitor, in a monitoring function, an anchor connection is pushed again, so that circulation is formed, and the browser cannot roll back to the previous page under the condition that the roll-back control is not closed.
As shown in fig. 2, there is provided a browser rollback control system 20, including: a fallback function registration module 21, a fallback control function registration module 22, a fallback control function adding module 23 and a browser fallback control module 24, wherein:
a rollback function registration module 21, configured to initialize a browser rollback control object, register a browser rollback function, and bind the rollback function with a callback trigger function;
a rollback control function registration module 22, configured to register and store a browser rollback control function according to the browser rollback function;
a rollback control function adding module 23, configured to determine whether a historical rollback control function exists in the function queue, and if the historical rollback control function exists, remove the historical rollback control function in the function queue, and add the browser rollback control function to the function queue;
and the browser rollback control module 24 is used for triggering and calling back the trigger function and controlling the rollback of the browser according to the browser rollback control function in the function queue.
In an embodiment, the fallback function registration module 21 is specifically configured to: clearing the functions stored in the function queue and registering a browser backspacing function; monitoring the change of a browser history record interface popstate through a browser object window; and binding the browser backspacing function with the callback trigger function.
In one embodiment, the fallback control function registration module 22 is specifically configured to: registering a browser backspacing control function according to the browser backspacing function, transmitting the browser backspacing control function into a browser, judging whether the transmitted browser backspacing control function is registered, and if the transmitted browser backspacing control function is not registered, storing the browser backspacing control function into a function queue; judging whether the browser backspacing control function controls the backspacing of the browser, if not, pushing an anchor address according to the browser backspacing control function, and controlling the backspacing of the browser through the anchor address.
In one embodiment, the rollback control function adding module 23 is specifically configured to: transmitting a browser backspacing control function into a browser, and judging whether a historical backspacing control function exists in a function queue; if the historical backspacing control function exists in the function queue, removing the historical backspacing control function; judging whether the historical backspacing control function is removed from the function queue and controlling the backspacing of the browser; if yes, backing and refreshing by the method of window.
In one embodiment, the browser rollback control module 24 is specifically configured to: triggering and calling back a trigger function, and judging whether a function queue is empty or not; if the function queue is not empty, traversing the browser rollback control function in the function queue, executing the browser rollback control function, pushing an anchor address, and controlling the browser to rollback according to the anchor address; if the function queue is empty, the anchor address is removed.
In this embodiment, a rollback control object of a browser is initialized by a rollback function registration module 21, a browser rollback function is re-registered and bound to a callback trigger function, a browser rollback control function is registered by a rollback control function registration module 22 and stored in a function queue, whether a historical rollback control function exists in the function queue is determined by a rollback control function adding module 23, when the historical rollback control function exists, the historical rollback control function is removed, the browser rollback control function is added to the function queue, when the callback trigger function is triggered, the browser is controlled to roll back according to the browser rollback control function in the function queue by a browser rollback control module 24, so that a popup window can be closed by a browser roll-back mode in a popup window page, for example, a physical rollback key or a rollback gesture of an android device, the data of the previous page of the browser is kept, meanwhile, the conventional operation habits of the user are met, and the use experience of the user is improved.
In one embodiment, a device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 3. The device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the device is configured to provide computing and control capabilities. The memory of the device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the device is used for storing configuration templates and also can be used for storing target webpage data. The network interface of the device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a browser rollback control method.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the devices to which the present application may be applied, and that a particular device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a storage medium may also be provided, the storage medium storing a computer program comprising program instructions which, when executed by a computer, may be part of a browser rollback control system as mentioned above, cause the computer to perform the method according to the previous embodiment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented in program code executable by a computing device, such that they may be stored on a computer storage medium (ROM/RAM, magnetic disks, optical disks) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1.一种浏览器回退控制方法,其特征在于,包括以下步骤:1. a browser fallback control method, is characterized in that, comprises the following steps: 初始化浏览器回退控制对象,注册浏览器回退函数,并与回调触发函数绑定;Initialize the browser fallback control object, register the browser fallback function, and bind it with the callback trigger function; 根据所述浏览器回退函数注册浏览器回退控制函数并保存;Register and save the browser fallback control function according to the browser fallback function; 判断函数队列中是否存在历史回退控制函数,若存在,则移除所述函数队列中的历史回退控制函数,将所述浏览器回退控制函数添加到所述函数队列中;Determine whether there is a historical fallback control function in the function queue, if so, remove the historical fallback control function in the function queue, and add the browser fallback control function to the function queue; 触发所述回调触发函数,根据函数队列中的浏览器回退控制函数,控制浏览器回退。The callback triggering function is triggered, and the browser is controlled to rollback according to the browser rollback control function in the function queue. 2.根据权利要求1所述的一种浏览器回退控制方法,其特征在于,所述初始化浏览器回退控制对象,注册浏览器回退函数,并与回调触发函数绑定,具体包括:2. The method for controlling browser fallback according to claim 1, wherein the initializing the browser fallback control object, registering the browser fallback function, and binding with the callback trigger function, specifically include: 清空函数队列中保存的函数,注册浏览器回退函数;Clear the functions saved in the function queue and register the browser fallback function; 通过浏览器对象监听浏览器历史记录接口的变化;Listen for changes in the browser history interface through the browser object; 将所述浏览器回退函数与回调触发函数绑定。Bind the browser fallback function to the callback trigger function. 3.根据权利要求1所述的一种浏览器回退控制方法,其特征在于,所述根据所述浏览器回退函数注册浏览器回退控制函数并保存,具体包括:3. A kind of browser fallback control method according to claim 1, is characterized in that, described according to described browser fallback function registering browser fallback control function and saving, specifically comprises: 根据所述浏览器回退函数注册浏览器回退控制函数,并传入浏览器;Register the browser fallback control function according to the browser fallback function, and pass it into the browser; 判断传入的浏览器回退控制函数是否注册,若未注册,则将所述浏览器回退控制函数保存至函数队列;Determine whether the incoming browser fallback control function is registered, and if not, save the browser fallback control function to the function queue; 判断所述浏览器回退控制函数是否已控制浏览器回退,若未控制,则根据所述浏览器回退控制函数推入锚点地址,通过所述锚点地址控制浏览器回退。It is judged whether the browser rollback control function has controlled the browser rollback, and if not, pushes the anchor point address according to the browser rollback control function, and controls the browser rollback through the anchor point address. 4.根据权利要求1所述的一种浏览器回退控制方法,其特征在于,所述判断函数队列中是否存在历史回退控制函数,若存在,则移除所述函数队列中的历史回退控制函数,将所述浏览器回退控制函数添加到所述函数队列中,具体包括:4. a kind of browser fallback control method according to claim 1, is characterized in that, whether there is historical fallback control function in described judgment function queue, if exists, then removes the historical fallback in described function queue. A fallback control function, adding the browser fallback control function to the function queue, specifically including: 将所述浏览器回退控制函数传入浏览器,判断函数队列中是否存在历史回退控制函数;Passing the browser fallback control function into the browser to determine whether there is a historical fallback control function in the function queue; 若所述函数队列中存在历史回退控制函数,则移除所述历史回退控制函数;If there is a historical fallback control function in the function queue, remove the historical fallback control function; 判断所述函数队列中时是否已移除所述历史回退控制函数,且已控制浏览器回退;judging whether the history rollback control function has been removed when the function queue is in, and the browser rollback has been controlled; 若是,则后退并刷新,移除所述浏览器回退控制函数。If so, back and refresh to remove the browser back-off control function. 5.根据权利要求4所述的一种浏览器回退控制方法,其特征在于,所述移除所述浏览器回退控制函数,具体包括:5. A kind of browser fallback control method according to claim 4, is characterized in that, described removing described browser fallback control function specifically comprises: 从函数队列中找出待移除函数的下标,判断所述下标是否大于或等于0;Find the subscript of the function to be removed from the function queue, and determine whether the subscript is greater than or equal to 0; 若所述下标大于或等于0,则所述函数队列中存在待移除函数;If the subscript is greater than or equal to 0, there is a function to be removed in the function queue; 根据所述下标移除函数队列中对应的待移除函数;Remove the corresponding function to be removed in the function queue according to the subscript; 移除所述待移除函数对应的锚点地址。Remove the anchor address corresponding to the function to be removed. 6.根据权利要求1所述的一种浏览器回退控制方法,其特征在于,所述触发所述回调触发函数,根据函数队列中的浏览器回退控制函数,控制浏览器回退,具体包括:6. The method for controlling browser rollback according to claim 1, wherein the triggering the callback trigger function controls the browser rollback according to the browser rollback control function in the function queue, specifically include: 触发所述回调触发函数,判断所述函数队列是否为空;Trigger the callback trigger function to determine whether the function queue is empty; 若所述函数队列不为空,则遍历所述函数队列中的浏览器回退控制函数,并执行所述浏览器回退控制函数,推入一个锚点地址,根据所述锚点地址控制浏览器回退;If the function queue is not empty, traverse the browser fallback control functions in the function queue, execute the browser fallback control function, push an anchor address, and control browsing according to the anchor address device fallback; 若所述函数队列为空,且检测到浏览器已回退时,则移除锚点地址。If the function queue is empty and it is detected that the browser has rolled back, the anchor address is removed. 7.根据权利要求6所述的一种浏览器回退控制方法,其特征在于,所述触发所述回调触发函数,根据函数队列中的浏览器回退控制函数,控制浏览器回退,还包括:7. A browser rollback control method according to claim 6, wherein the triggering the callback trigger function controls the browser rollback according to the browser rollback control function in the function queue, and also controls the browser rollback. include: 检测使用者是否为管理人员,在所述使用者为管理人员时,退回上一页面并刷新;Detect whether the user is an administrator, and when the user is an administrator, return to the previous page and refresh; 检测当前界面是否为预设界面,且当前时间是否处于预设时间段内,在当前界面为非预设界面,或当前时间未处于预设时间段内时,退回上一页面并刷新;Detect whether the current interface is the preset interface, and whether the current time is within the preset time period, if the current interface is not the preset interface, or the current time is not within the preset time period, return to the previous page and refresh; 在检测到使用者持续点击浏览器回退控件至少3秒时,退回上一页面并刷新。When it is detected that the user continues to click the browser back control for at least 3 seconds, go back to the previous page and refresh. 8.一种浏览器回退控制系统,其特征在于,包括:8. A browser fallback control system, comprising: 回退函数注册模块,用于初始化浏览器回退控制对象,注册浏览器回退函数,并与回调触发函数绑定;The fallback function registration module is used to initialize the browser fallback control object, register the browser fallback function, and bind it with the callback trigger function; 回退控制函数注册模块,用于根据所述浏览器回退函数注册浏览器回退控制函数并保存;a fallback control function registration module, configured to register and save the browser fallback control function according to the browser fallback function; 回退控制函数添加模块,用于判断函数队列中是否存在历史回退控制函数,若存在,则移除所述函数队列中的历史回退控制函数,将所述浏览器回退控制函数添加到所述函数队列中;A fallback control function adding module is used to determine whether there is a historical fallback control function in the function queue, and if so, remove the historical fallback control function in the function queue, and add the browser fallback control function to the function queue. in the function queue; 浏览器回退控制模块,用于触发所述回调触发函数,根据函数队列中的浏览器回退控制函数,控制浏览器回退。The browser rollback control module is used for triggering the callback trigger function, and controls the browser rollback according to the browser rollback control function in the function queue. 9.一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。9. A device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1 to 7 when the processor executes the computer program the steps of the method described in item. 10.一种存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。10. A storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202111425380.XA 2021-11-26 2021-11-26 Browser backspacing control method, system, equipment and storage medium Pending CN114036428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111425380.XA CN114036428A (en) 2021-11-26 2021-11-26 Browser backspacing control method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111425380.XA CN114036428A (en) 2021-11-26 2021-11-26 Browser backspacing control method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114036428A true CN114036428A (en) 2022-02-11

Family

ID=80145692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111425380.XA Pending CN114036428A (en) 2021-11-26 2021-11-26 Browser backspacing control method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114036428A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222736A1 (en) * 2008-02-29 2009-09-03 Clark Bryan William Systems and methods for a filter module for a browser history
CN106227887A (en) * 2016-08-12 2016-12-14 汪念鸿 A kind of method returning the former page in browser new page
CN106339163A (en) * 2016-08-30 2017-01-18 竞技世界(北京)网络技术有限公司 Backspacing interaction method of App built-in browser and embedded webpage
WO2017162072A1 (en) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 Method and device for jumping between pages
US11023558B1 (en) * 2020-04-03 2021-06-01 International Business Machines Corporation Executing functions on-demand on a server utilizing web browsers
CN113343138A (en) * 2021-05-31 2021-09-03 北京达佳互联信息技术有限公司 Rollback interception method and device, intelligent terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222736A1 (en) * 2008-02-29 2009-09-03 Clark Bryan William Systems and methods for a filter module for a browser history
WO2017162072A1 (en) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 Method and device for jumping between pages
CN106227887A (en) * 2016-08-12 2016-12-14 汪念鸿 A kind of method returning the former page in browser new page
CN106339163A (en) * 2016-08-30 2017-01-18 竞技世界(北京)网络技术有限公司 Backspacing interaction method of App built-in browser and embedded webpage
US11023558B1 (en) * 2020-04-03 2021-06-01 International Business Machines Corporation Executing functions on-demand on a server utilizing web browsers
CN113343138A (en) * 2021-05-31 2021-09-03 北京达佳互联信息技术有限公司 Rollback interception method and device, intelligent terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ITVITA: "Jquery监听浏览器前进后退", HTTPS://WWW.CNBLOGS.COM/LIUQIANG88/P/8479924.HTML, 27 February 2018 (2018-02-27), pages 1 - 6 *

Similar Documents

Publication Publication Date Title
US20200401418A1 (en) Application preloading in the presence of user actions
EP3508974B1 (en) Method and terminal for allocating system resource to application
CN112991635B (en) Storage and taking method and device for intelligent cabinet
CN104572912B (en) A kind of Webpage loading method and system
US7934129B2 (en) Network hang recovery
CN108280168B (en) Web page processing method/system, computer readable storage medium and electronic device
CN104268229B (en) Resource obtaining method and device based on multi-process browser
CN106201904B (en) Method and device for memory garbage reclamation
CN108874324B (en) An access request processing method, apparatus, device and readable storage medium
CN109740041B (en) Webpage crawling method and device, storage medium and computer equipment
CN110134490B (en) Virtual machine dynamic migration method, device and storage medium
CN110007978A (en) A kind of method, device and equipment preloading the page
WO2019140739A1 (en) Method for determining return visits to client, and electronic apparatus and computer-readable storage medium
CN111045789B (en) Virtual machine starting method and device, electronic equipment and storage medium
EP3291109A1 (en) Document object model transaction crawler
CN110543348B (en) Instruction processing method, system, electronic equipment and storage medium
CN114036428A (en) Browser backspacing control method, system, equipment and storage medium
CN115933946A (en) Page jump method, device, computer equipment and storage medium
CN114546556A (en) Method, device, electronic device and storage medium for processing advertisement in application
CN109976790B (en) Application updating method, device, terminal and storage medium
JP2008299360A (en) History information management method and history information management system
CN111611520B (en) Flow cheating monitoring method and device, electronic equipment and storage medium
CN111090515A (en) An access control method, device, terminal device and storage medium
CN113613063A (en) Application exception recovery method, device, computer program product and storage medium
CN112199130B (en) Binding function execution method, device, 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230602

Address after: Room 1-1-18, Unit 1, Building 4, No. 1580 Zhiyun Avenue, Yudong Street, Banan District, Chongqing, 401320

Applicant after: Chongqing Yunfeng Technology Co.,Ltd.

Address before: 408300 building a, 59 Chaoyang Road, Dianjiang Industrial Park, Chongqing

Applicant before: Chongqing Yuncheng Internet Technology Co.,Ltd.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220211