WO2017107834A1 - 页面切换方法、装置、计算机程序及可读介质 - Google Patents

页面切换方法、装置、计算机程序及可读介质 Download PDF

Info

Publication number
WO2017107834A1
WO2017107834A1 PCT/CN2016/109993 CN2016109993W WO2017107834A1 WO 2017107834 A1 WO2017107834 A1 WO 2017107834A1 CN 2016109993 W CN2016109993 W CN 2016109993W WO 2017107834 A1 WO2017107834 A1 WO 2017107834A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
identification information
touch track
current
information
Prior art date
Application number
PCT/CN2016/109993
Other languages
English (en)
French (fr)
Inventor
杨德立
Original Assignee
北京奇虎科技有限公司
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 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2017107834A1 publication Critical patent/WO2017107834A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a page switching method and apparatus, a computer program, and a readable medium.
  • the script webview is loaded by the same page in the browser tag to advance or rewind the page.
  • the switch to the browse page through the same webview is essentially the same webview update to display different page content, and the webview update needs to re-render the previous or next page content, so the page will appear after switching the page.
  • the situation of flashing white so the existing page forward and backward switching effect is limited, it is difficult to achieve a smooth transition in the implementation of the switching effect.
  • the present invention provides a page switching method, apparatus, computer program and readable medium, the main purpose of which is to improve the effect of switching browsing pages.
  • a page switching method comprising:
  • the page identification information corresponding to the current page URL is obtained from the cached page information list, and the plurality of page loading scripts corresponding to the browser tag are cached in the cached page information list, and loaded with the page The page URL and page identification information corresponding to the script;
  • the switched page is displayed according to the target page loading script.
  • a page switching apparatus comprising:
  • a detecting unit configured to detect whether a preset touch track corresponding to the browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages;
  • An obtaining unit configured to: obtain, according to the preset touch track corresponding to the browser tag, the page identifier information corresponding to the current page URL from the cache page information list, where the browser tag is cached in the cache page information list Corresponding multiple page loading scripts, and page URLs and page identification information corresponding to the page loading scripts;
  • the acquiring unit is further configured to obtain a target page loading script from the cache page information list according to the direction of the preset touch track and the identification information of the current page;
  • a display unit configured to load a script according to the target page, and display the switched page.
  • Embodiments of the present invention also provide a computer program comprising computer readable code that, when executed on a computing device, causes the computing device to perform page switching in accordance with any of the embodiments of the present invention method.
  • the embodiment of the invention further provides a readable medium in which a computer program as described in the embodiment of the invention is stored.
  • the technical solution provided by the embodiment of the present invention has at least the following advantages:
  • the method and device for switching a page firstly detect whether a preset touch track corresponding to a browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple a page, if received, obtaining page identification information corresponding to the current page URL from the cache page information list, wherein the cache page information list is cached with a plurality of page load scripts corresponding to the browser tag, and The page URL corresponding to the page loading script and the page identification information, and then acquiring the target page loading script from the cached page information list according to the direction of the preset touch track and the identification information of the current page, and finally loading according to the target page Script that displays the page after the switch.
  • the present invention switches between different pages by different page loading scripts, thereby realizing the switching between different pages, thereby solving the browsing through the same webview.
  • the generated page is flashed, which improves the switching effect of the browsing page.
  • FIG. 1 is a flowchart of a page switching method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another page switching method according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a page switching apparatus according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of another page switching apparatus according to an embodiment of the present invention.
  • Figure 5 shows a block diagram of a computing device for performing a page switching method in accordance with the present invention
  • Figure 6 shows a storage unit for holding or carrying program code implementing a page switching method in accordance with the present invention.
  • the embodiment of the invention provides a page switching method. As shown in FIG. 1 , the method includes:
  • the preset touch track is used to indicate that the current page is switched, the browser tag corresponds to multiple pages, and each browser tag is a display window. It should be noted that the preset touch track may be configured according to actual operation requirements of the user, for example, the touch track that is swiped from the left side of the screen to the right may be set to switch the page forward; The touch track is set to switch the page backwards, or the double-click on the left side of the screen is set to switch the page forward, and the right side of the double-click screen is set to switch the page backwards, which is not specifically limited in the embodiment of the present invention.
  • the cache page information list is cached with a plurality of page load scripts corresponding to the browser tag, and a page URL and a page identifier information corresponding to the page load script, and the page load script may be a webpage display function webview.
  • the identification information of the page is used to uniquely identify the location of the page in the cached page information list, and the identification information of the page is specifically defined according to the order of adding the page.
  • the initial value of the identification information of the page may be set to -1.
  • the identification information of the first page added by the user through the browser tab is 0, the identification information of the second page is 1, the identification information of the third page is 2, and so on, each of the browser tags is calculated.
  • the identification information of the page is calculated.
  • the page loading script in the cache page information list and the page in the browser tag correspond to And the corresponding page identification information and the page loading script can be found from the cache page information list through the page URL.
  • the present invention encapsulates a multi-page ViewGroup management class in a tag by using a TabPage Flipper function, and the browser uses multiple webviews to load and display multiple pages in the tag.
  • a tag corresponds to a WebViewTab function.
  • the WebViewTab function is set to allow when the initial TabPageFlipper function is initialized.
  • the corresponding webview object is added to the TabPageFlipper, and the onTouchListener event listener is added.
  • the cache page information list may be managed by a function WebviewTab, where the list may be cached with identifier information corresponding to each page in the browser tag, a page load script webview list mCachedPages, and a page URL, a page URL.
  • the address is used to identify the URL address corresponding to the displayed page.
  • the identification information of the next page is obtained according to the identification information corresponding to the current page;
  • the identification information of the previous page is obtained by subtracting 1 corresponding to the identification information corresponding to the current page. Then, according to the obtained page identification information, the corresponding target page loading script is obtained from the cached page information list.
  • the direction of the preset touch track is from the left and right of the screen
  • the instruction corresponding to the touch track is to switch the page forward
  • the identifier information corresponding to the current page is 2.
  • the instruction corresponding to the preset touch track in this example is to switch the page forward, and the page is switched forward according to the identifier information corresponding to the current page, and the identifier information of the previous page is obtained by subtracting 1 from the cached page information list.
  • the page loading script with the page identification information of 1 is a page loading script corresponding to the page identification information of 1 in the cached page information list.
  • the page loading scripts corresponding to different pages are switched, and switching between different pages is implemented, thereby solving the page flashing situation when the browsing of the browsing page by the same webview is performed. This improves the switching effect of browsing the page.
  • a page switching method provided by the embodiment of the present invention first detects whether a preset touch track corresponding to a browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages. If received, the page identification information corresponding to the current page URL is obtained from the cached page information list, and the plurality of page loading scripts corresponding to the browser tag are cached in the cached page information list, and loaded with the page The page URL corresponding to the script and the page identification information, and then obtaining the target page loading script from the cache page information list according to the direction of the preset touch track and the identification information of the current page, and finally according to the The target page load script displays the page after the switch.
  • the present invention switches between different pages by different page loading scripts, thereby realizing the switching between different pages, thereby solving the browsing through the same webview.
  • the generated page is flashed, which improves the switching effect of the browsing page.
  • An embodiment of the present invention provides another page switching method. As shown in FIG. 2, the method includes:
  • the preset touch track is used to indicate that the current page is switched, the browser tag corresponds to multiple pages, and each browser tag is a display window. It should be noted that the preset touch track may be configured according to actual operation requirements of the user, for example, the touch track that is swiped from the left side of the screen to the right may be set to switch the page forward; The touch track is set to switch the page backwards, or the double-click on the left side of the screen is set to switch the page forward, and the right side of the double-click screen is set to switch the page backwards, which is not specifically limited in the embodiment of the present invention.
  • the cache page information list is cached with a plurality of page load scripts corresponding to the browser tags, and a page URL and page identifier information corresponding to the page load script, and the page load script is a webpage display function webview. .
  • the identification information of the next page is obtained according to the identification information corresponding to the current page;
  • the identification information of the previous page is obtained by subtracting 1 corresponding to the identification information corresponding to the current page. Then, according to the obtained page identification information, the corresponding target page loading script is obtained from the cached page information list.
  • the obtaining, according to the direction of the preset touch track and the identification information of the current page, the target page loading script from the cache page information list includes:
  • the instruction corresponding to the direction of the preset touch track is a page loading script for acquiring the identification information of the previous page corresponding to the identification information of the current page from the cache page information list when the page is forwardly switched; or
  • the page load script for acquiring the identification information of the next page corresponding to the identification information of the current page is obtained from the cache page information list.
  • the method further includes: configuring the identification information of the page for each page according to the order of adding the corresponding plurality of pages in the browser tag, and configuring the identification information of each page separately.
  • Corresponding page loading scripts and page URLs; the page loading scripts and page URLs corresponding to the identification information of each page corresponding to the browser tag and the identification information of each page are cached in the cache page information list.
  • the cache page information list further caches a result of whether each page supports a preset touch track switching page. For the embodiment of the present invention, whether the result of supporting the preset touch track switching page corresponding to each page is saved in the cache page information list can improve the checking efficiency of the page when the subsequent page is cut, thereby improving the efficiency of page switching.
  • the displaying the converted page according to the target page loading script includes: if there is no identification information of the previous page corresponding to the identification information of the current page or identification information of the next page, The current page is displayed. If the identification information of the previous page or the identification information of the next page corresponding to the identification information of the current page does not exist, the current page can be displayed to ensure that the page information can be obtained normally, and the display abnormality is avoided.
  • the displaying the switched page includes: displaying the switched page according to the preset playing effect; and correspondingly updating the browsing according to the identification information of the previous page or the identification information of the next page corresponding to the identifier information of the current page
  • the display status of the forward command and the reverse command in the status bar at the bottom of the device label may be continuously optimized, such as a page turning effect, or a switching effect between other Views and Views, which is not specifically limited in the embodiment of the present invention.
  • updating the display status information of the forward instruction and the backward instruction in the status bar at the bottom of the browser tab may prompt the user whether the current page can perform the forward or backward operation.
  • the forward instruction in the bottom status bar is grayed out, It indicates that the current page cannot perform the forward page operation; when the forward command in the bottom status bar is highlighted, the current page can perform the forward page operation, and the similar back command is also displayed in gray or highlighted to indicate whether the user can Perform a back page operation.
  • Another page switching method provided by the embodiment of the present invention first detects whether a preset touch track corresponding to a browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages. If received, it is obtained from the cache page information list. a page identification information corresponding to the current page URL, wherein the cache page information list is cached with a plurality of page load scripts corresponding to the browser tag, and a page URL and page identification information corresponding to the page load script, and then according to And deleting the target page loading script from the cache page information list, and finally displaying the switched page according to the target page loading script.
  • the present invention switches between different pages by different page loading scripts, thereby realizing the switching between different pages, thereby solving the browsing through the same webview.
  • the generated page is flashed, which improves the switching effect of the browsing page.
  • an embodiment of the present invention provides a page switching apparatus.
  • the apparatus includes: a detecting unit 31, an obtaining unit 32, and a display unit 33.
  • the detecting unit 31 is configured to detect whether a preset touch track corresponding to the browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages;
  • the obtaining unit 32 is configured to obtain the page identification information corresponding to the current page URL from the cache page information list, if the preset touch track corresponding to the browser tag is received, where the browser is cached in the cache page information list. a plurality of page loading scripts corresponding to the label, and a page URL and page identification information corresponding to the page loading script;
  • the obtaining unit 32 is further configured to obtain a target page loading script from the cache page information list according to the direction of the preset touch track and the identification information of the current page;
  • the display unit 33 is configured to display the switched page according to the target page loading script.
  • a page switching apparatus provided by the embodiment of the present invention first detects whether a preset touch track corresponding to a browser tag is received, and the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages. If received, the page identification information corresponding to the current page URL is obtained from the cached page information list, and the plurality of page loading scripts corresponding to the browser tag are cached in the cached page information list, and loaded with the page a page URL corresponding to the script and the page identification information, and then acquiring a target page loading script from the cached page information list according to the direction of the preset touch track and the identification information of the current page, and finally loading the script according to the target page. The page after switching is displayed.
  • the present invention switches between different pages by different page loading scripts, thereby realizing the switching between different pages, thereby solving the browsing through the same webview.
  • the generated page is flashed, which improves the switching effect of the browsing page.
  • an embodiment of the present invention provides another page switching apparatus.
  • the apparatus includes: a detecting unit 41, an obtaining unit 42, and a display unit 43.
  • the detecting unit 41 is configured to detect whether a preset touch track corresponding to the browser tag is received, where the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages;
  • the obtaining unit 42 is configured to: if the preset touch track corresponding to the browser tag is received, obtain the page identification information corresponding to the current page URL from the cache page information list, where the browser is cached in the cache page information list a plurality of page loading scripts corresponding to the label, and a page URL and page identification information corresponding to the page loading script;
  • the obtaining unit 42 is further configured to: obtain a target page loading script from the cache page information list according to the direction of the preset touch track and the identification information of the current page;
  • the display unit 43 is configured to display the switched page according to the target page loading script.
  • the device further includes: a determining unit 44;
  • the determining unit 44 is configured to determine whether the current page supports a preset touch track switching page
  • the obtaining unit 42 is specifically configured to: if the current page supports the preset touch track switching page, obtain the page identification information corresponding to the current page URL from the cache page information list.
  • the acquiring unit 42 is specifically configured to: when the instruction corresponding to the direction of the preset touch track is a forward switching page, obtain the previous one corresponding to the identification information of the current page from the cache page information list. a page load script for the identification information of the page;
  • the acquiring unit 42 is configured to: when the instruction corresponding to the direction of the preset touch track is to switch the page backward, obtain the next one corresponding to the identifier information of the current page from the cache page information list.
  • the page load script for the identification information of the page is configured to: when the instruction corresponding to the direction of the preset touch track is to switch the page backward, obtain the next one corresponding to the identifier information of the current page from the cache page information list.
  • the display unit 43 is specifically configured to display the current page if there is no identification information of the previous page or identification information of the next page corresponding to the identification information of the current page.
  • the display unit 43 includes:
  • the display module 431 is configured to display the switched page according to the preset playing effect
  • the update module 432 is configured to update the display state of the forward instruction and the back instruction of the status bar at the bottom of the browser label according to the identifier information of the previous page or the identifier information of the next page corresponding to the identifier information of the current page.
  • the device further includes:
  • the configuration unit 45 is configured to configure the identification information of the page for each page according to the order of adding the corresponding multiple pages in the browser tag, and configure corresponding page loading scripts and page URLs for the identification information of each page. ;
  • a cache unit 46 configured to: identify information of each page corresponding to the browser tag, and The page loading script and the page URL corresponding to the identification information of each page are cached in the cache page information list.
  • the cache page information list further caches a result of whether each page supports a preset touch track switching page.
  • the page loading script is a webpage display function webview.
  • Another page switching apparatus provided by the embodiment of the present invention first detects whether a preset touch track corresponding to a browser tag is received, and the preset touch track is used to indicate that the current page is switched, and the browser tag corresponds to multiple pages. If received, the page identifier information corresponding to the current page URL is obtained from the cache page information list, and the cache page information list is cached with a plurality of page load scripts corresponding to the browser tag, and the page is Loading a page URL corresponding to the script and page identification information, and then acquiring a target page loading script from the cached page information list according to the direction of the preset touch track and the identification information of the current page, and finally loading the script according to the target page , displays the page after switching.
  • the present invention switches between different pages by different page loading scripts, thereby realizing the switching between different pages, thereby solving the browsing through the same webview.
  • the generated page is flashed, which improves the switching effect of the browsing page.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the page switching method and apparatus in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 5 illustrates a computing device that can implement a page switching method in accordance with the present invention.
  • the computing device conventionally includes a processor 510 and a program product or readable medium in the form of a memory 520.
  • the memory 520 can be, for example, a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory) Electronic memory such as a memory), EPROM or ROM.
  • Memory 520 has a memory space 530 for program code 531 for performing any of the method steps described above.
  • storage space 530 for program code may include various program code 531 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 520 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 531', ie, code that can be read by a processor, such as 510, that when executed by a computing device causes the computing device to perform various steps in the methods described above .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种页面切换方法、装置、计算机程序及可读介质,用于切换浏览页面。所述方法包括:检测是否接收到浏览器标签对应的预置触摸轨迹(101,201),所述预置触摸轨迹用于指示切换当前页面;若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息(102),所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本(103,204);根据所述目标页面加载脚本,显示切换后的页面(104,205)。所述方法、装置、计算机程序及可读介质,能够解决现有浏览页面切换后出现的闪白状况。

Description

页面切换方法、装置、计算机程序及可读介质 技术领域
本发明涉及网络技术领域,特别是涉及一种页面切换方法及装置、一种计算机程序及一种可读介质。
背景技术
近些年来,随着信息技术的不断发展,互联网技术越来越成熟,通过浏览器浏览信息已经成为人们日常生活中的一部分,浏览器的普及率也越来越高。其中,浏览器支持的主要功能之一就是在一个浏览器标签内承载多个网页页面,并可以进行网页页面切换展示。
目前,在对浏览页面进行切换时,主要是通过浏览器标签内对应的同一个页面加载脚本webview实现页面的前进或后退。然而通过同一个webview对浏览页面进行的切换,其本质就是使用同一个webview更新显示不同的页面内容,而webview的更新需要重新渲染上一页或者下一页内容,所以在切换页面后会出现页面闪白的状况,因此现有的页面前进后退切换效果受到了限制,在切换效果的实现上很难做到平滑过渡。
发明内容
有鉴于此,本发明提供一种页面切换方法、装置、计算机程序及可读介质,主要目的在于提高切换浏览页面的效果。
依据本发明一个方面,提供了一种页面切换方法,该方法包括:
检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
根据所述目标页面加载脚本,显示切换后的页面。
依据本发明一个方面,提供了一种页面切换装置,该装置包括:
检测单元,用于检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
获取单元,用于若接收到浏览器标签对应的预置触摸轨迹,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
所述获取单元,还用于根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
显示单元,用于根据所述目标页面加载脚本,显示切换后的页面。
本发明实施例还提供一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据本发明实施例中的任一个所述的页面切换方法。
本发明实施例还提供了一种可读介质,其中存储了如本发明实施例所述的计算机程序。
借由上述技术方案,本发明实施例提供的技术方案至少具有下列优点:
本发明实施例提供的一种页面切换方法及装置,首先检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,然后根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本,最后根据所述目标页面加载脚本,显示切换后的页面。与目前通过一个页面加载脚本webview实现页面的前进或后退相比,本发明是通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了本发明实施例提供的一种页面切换方法流程图;
图2示出了本发明实施例提供的另一种页面切换方法流程图;
图3示出了本发明实施例提供的一种页面切换装置结构框图;
图4示出了本发明实施例提供的另一种页面切换装置结构框图;
图5示出了用于执行根据本发明的页面切换方法的计算设备的框图;
图6示出了用于保持或者携带实现根据本发明的页面切换方法的程序代码的存储单元。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
为使本发明技术方案的优点更加清楚,下面结合附图和实施例对本发明作详细说明。
本发明实施例提供了一种页面切换方法,如图1所示,所述方法包括:
101、检测是否接收到浏览器标签对应的预置触摸轨迹。
其中,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,每一个浏览器标签为一个显示窗口。需要说明的是,所述预置触摸轨迹可以根据用户的实际操作需求进行配置,如可将从屏幕左侧向右划的触摸轨迹设置为向前切换页面;将从屏幕右侧向左划的触摸轨迹设置为向后切换页面,或者将双击屏幕左侧设置为向前切换页面,将双击屏幕右侧设置为向后切换页面,本发明实施例不做具体限定。
102、若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息。
其中,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,页面加载脚本具体可以为网页显示函数webview。所述页面的标识信息用于唯一标识该页面在缓存页面信息列表中所在的位置,所述页面的标识信息具体是根据添加页面的顺序进行定义的。在本发明实施例中,可将页面的标识信息的初始值设置为-1,当用户通过浏览器标签新增加一个页面时,该页面对应的标识信息就对应加1。例如,用户通过浏览器标签浏览增加的第一个页面的标识信息为0,第二个页面的标识信息为1,第三个页面的标识信息为2,以此类推计算浏览器标签内的各个页面的标识信息。对于本发明实施例,缓存页面信息列表中的页面加载脚本和浏览器标签内的页面是对应 的,且通过页面URL可以从缓存页面信息列表中找到对应的页面标识信息及页面加载脚本。
需要说明的是,本发明是通过TabPageFlipper函数封装标签内多页面的ViewGroup管理类,浏览器同标签内多个页面使用多个webview进行加载展现。一个标签对应着一个WebViewTab函数。初始TabPageFlipper函数时就将WebViewTab函数设置为允许。当增加页面时,也会对应的往TabPageFlipper中添加相应的webview对象,并添加onTouchListener事件监听。在本发明实施例中,缓存页面信息列表可以通过函数WebviewTab进行管理,该列表具体可以由缓存有浏览器标签内每个页面对应的标识信息、页面加载脚本webview列表mCachedPages,以及页面URL,页面URL地址用于标识所显示的页面对应的URL地址。
103、根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本。
对于本发明实施例,当所述预置触摸轨迹的方向为从屏幕右侧向左划时,则是根据当前页面对应的标识信息对应加1得到后一个页面的标识信息;当所述预置触摸轨迹的方向为从屏幕左侧向右划时,则是根据当前页面对应的标识信息对应减1得到前一个页面的标识信息。然后根据得到的页面标识信息从缓存页面信息列表中获取对应的目标页面加载脚本。
例如,预置触摸轨迹的方向为从屏幕左侧右左划,该触摸轨迹对应的指令为向前切换页面,当前页面对应的标识信息为2。由于本例中预置触摸轨迹对应的指令为向前切换页面,而向前切换页面则是根据当前页面对应的标识信息对应减1得到前一个页面的标识信息,因此从缓存页面信息列表中获取页面标识信息为1的页面加载脚本,即在缓存页面信息列表中和页面标识信息为1对应的页面加载脚本。
104、根据所述目标页面加载脚本,显示切换后的页面。
对于本发明实施例,通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
本发明实施例提供的一种页面切换方法,首先检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,然后根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本,最后根据所 述目标页面加载脚本,显示切换后的页面。与目前通过一个页面加载脚本webview实现页面的前进或后退相比,本发明是通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
本发明实施例提供了另一种页面切换方法,如图2所示,所述方法包括:
201、检测是否接收到浏览器标签对应的预置触摸轨迹。
其中,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,每一个浏览器标签为一个显示窗口。需要说明的是,所述预置触摸轨迹可以根据用户的实际操作需求进行配置,如可将从屏幕左侧向右划的触摸轨迹设置为向前切换页面;将从屏幕右侧向左划的触摸轨迹设置为向后切换页面,或者将双击屏幕左侧设置为向前切换页面,将双击屏幕右侧设置为向后切换页面,本发明实施例不做具体限定。
202、若接收到,则判断当前页面是否支持预置触摸轨迹切换页面。
需要说明的是,由于某些的网站的页面内有自己的左右划屏处理,比如图片浏览页面,这样在左右划屏幕界面时,用户更愿意去切换显示网页中的图片,而非切换浏览页面。因此,在接收到浏览器标签对应的预置触摸轨迹后,需要判断当前页面是否支持预置触摸轨迹切换页面,若支持则可对当前页面进行切换,若不支持则根据网站页面自身设置进行相应的显示操作。
203、若当前页面支持预置触摸轨迹切换页面,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息。
其中,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,所述页面加载脚本为网页显示函数webview。
204、根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本。
对于本发明实施例,当所述预置触摸轨迹的方向为从屏幕右侧向左划时,则是根据当前页面对应的标识信息对应加1得到后一个页面的标识信息;当所述预置触摸轨迹的方向为从屏幕左侧向右划时,则是根据当前页面对应的标识信息对应减1得到前一个页面的标识信息。然后根据得到的页面标识信息从缓存页面信息列表中获取对应的目标页面加载脚本。
对于本发明实施例,所述根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本包括:当所 述预置触摸轨迹的方向对应的指令为向前切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的上一个页面的标识信息的页面加载脚本;或当所述预置触摸轨迹的方向对应的指令为向后切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的下一个页面的标识信息的页面加载脚本。
进一步地,在步骤204之前,所述方法还包括:根据所述浏览器标签中对应的多个页面的添加顺序,为每一个页面配置页面的标识信息,并为每一个页面的标识信息分别配置对应的页面加载脚本、页面URL;将所述浏览器标签对应的每一个页面的标识信息和每一个页面的标识信息对应的页面加载脚本、页面URL缓存到所述缓存页面信息列表中。在本发明实施例中,所述缓存页面信息列表中还缓存有每一个页面对应的是否支持预置触摸轨迹切换页面的结果。对于本发明实施例,将每一个页面对应的是否支持预置触摸轨迹切换页面的结果保存到缓存页面信息列表中,可以提高后续切面页面时对页面的检查效率,从而提高了页面切换的效率。
205、根据所述目标页面加载脚本,显示切换后的页面。
对于本发明实施例,所述根据所述目标页面加载脚本,显示切换后的页面包括:若不存在与所述当前页面的标识信息对应的上一个页面的标识信息或者下一个页面的标识信息,则显示当前页面。若不存在与所述当前页面的标识信息对应的上一个页面的标识信息或者下一个页面的标识信息,通过显示当前页面可以保证用户可以正常获取到页面信息,避免出现显示异常的情况。
所述显示切换后的页面包括:根据预置播放效果,显示切换后的页面;根据所述当前页面的标识信息对应的上一个页面的标识信息或下一个页面的标识信息,对应更新所述浏览器标签底部状态栏的前进指令、后退指令的显示状态。所述预置播放效果可以持续优化,比如翻页效果,或者其他View和View之间的切换效果,本发明实施例不做具体限定。在发明实施例中,更新浏览器标签底部状态栏中前进指令和后退指令的显示状态信息,可以提示用户当前页面是否可进行前进或后退操作,当底部状态栏中前进指令为灰色显示时,则说明当前页面不可进行前进页面操作;当底部状态栏中前进指令为高亮显示时,则说明当前页面可以进行前进页面操作,相似的后退指令也是通过灰色或高亮的显示状态,提示用户是否可进行后退页面操作。
本发明实施例提供的另一种页面切换方法,首先检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,若接收到,则从缓存页面信息列表中获取 与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,然后根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本,最后根据所述目标页面加载脚本,显示切换后的页面。与目前通过一个页面加载脚本webview实现页面的前进或后退相比,本发明是通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
进一步地,作为图1所述方法的具体实现,本发明实施例提供一种页面切换装置,如图3所示,所述装置包括:检测单元31、获取单元32、显示单元33。
检测单元31,用于检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
获取单元32,用于若接收到浏览器标签对应的预置触摸轨迹,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
所述获取单元32,还用于根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
显示单元33,用于根据所述目标页面加载脚本,显示切换后的页面。
需要说明的是,本发明实施例提供的一种页面切换装置所涉及各功能单元的其他相应描述,可以参考图1中的对应描述,在此不再赘述。
本发明实施例提供的一种页面切换装置,首先检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,然后根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本,最后根据所述目标页面加载脚本,显示切换后的页面。与目前通过一个页面加载脚本webview实现页面的前进或后退相比,本发明是通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
进一步地,作为图2所述方法的具体实现,本发明实施例提供另一种页面切换装置,如图4所示,所述装置包括:检测单元41、获取单元42、显示单元43。
检测单元41,用于检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
获取单元42,用于若接收到浏览器标签对应的预置触摸轨迹,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
所述获取单元42,还用于根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
显示单元43,用于根据所述目标页面加载脚本,显示切换后的页面。
进一步地,所述装置还包括:判断单元44;
所述判断单元44,用于判断所述当前页面是否支持预置触摸轨迹切换页面;
所述获取单元42,具体用于若所述当前页面支持预置触摸轨迹切换页面,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息。
所述获取单元42,具体用于当所述预置触摸轨迹的方向对应的指令为向前切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的上一个页面的标识信息的页面加载脚本;
所述获取单元42,具体用于当所述预置触摸轨迹的方向对应的指令为向后切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的下一个页面的标识信息的页面加载脚本。
所述显示单元43,具体用于若不存在与所述当前页面的标识信息对应的上一个页面的标识信息或者下一个页面的标识信息,则显示当前页面。
进一步地,所述显示单元43包括:
显示模块431,用于根据预置播放效果,显示切换后的页面;
更新模块432,用于根据所述当前页面的标识信息对应的上一个页面的标识信息或下一个页面的标识信息,对应更新所述浏览器标签底部状态栏的前进指令、后退指令的显示状态。
进一步地,所述装置还包括:
配置单元45,用于根据所述浏览器标签中对应的多个页面的添加顺序,为每一个页面配置页面的标识信息,并为每一个页面的标识信息分别配置对应的页面加载脚本、页面URL;
缓存单元46,用于将所述浏览器标签对应的每一个页面的标识信息和 每一个页面的标识信息对应的页面加载脚本、页面URL缓存到所述缓存页面信息列表中。
进一步地,所述缓存页面信息列表中还缓存有每一个页面对应的是否支持预置触摸轨迹切换页面的结果。
对于本发明实施例,所述页面加载脚本为网页显示函数webview。
需要说明的是,本发明实施例提供的另一种页面切换装置所涉及各功能单元的其他相应描述,可以参考图2中的对应描述,在此不再赘述。
本发明实施例提供的另一种页面切换装置,首先检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面,若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息,然后根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本,最后根据所述目标页面加载脚本,显示切换后的页面。与目前通过一个页面加载脚本webview实现页面的前进或后退相比,本发明是通过不同页面分别对应的页面加载脚本进行切换,实现了不同页面之间的切换,从而解决了通过同一个webview对浏览页面进行的切换时,所产生的页面闪白状况,进而提高了浏览页面的切换效果。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
可以理解的是,上述方法及装置中的相关特征可以相互参考。另外,上述实施例中的“第一”、“第二”等是用于区分各实施例,而并不代表各实施例的优劣。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中, 并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的页面切换方法及装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图5示出了可以实现根据本发明的页面切换方法的计算设备。该计算设备传统上包括处理器510和以存储器520形式的程序产品或者可读介质。存储器520可以是诸如闪存、EEPROM(电可擦除可编程只读存 储器)、EPROM或者ROM之类的电子存储器。存储器520具有用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,用于程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图6所述的便携式或者固定存储单元。该存储单元可以具有与图5的计算设备中的存储器520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码531’,即可以由例如诸如510之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读取存储介质中,比如ROM/RAM、磁碟、光盘等。
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (18)

  1. 一种页面切换方法,包括:
    检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
    若接收到,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
    根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
    根据所述目标页面加载脚本,显示切换后的页面。
  2. 根据权利要求1所述的方法,其特征在于,所述从缓存页面信息列表中获取与当前页面URL对应的页面标识信息之前,所述方法还包括:
    判断所述当前页面是否支持预置触摸轨迹切换页面;
    所述从缓存页面信息列表中获取与当前页面URL对应的页面标识信息包括:
    若支持预置触摸轨迹切换页面,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本包括:
    当所述预置触摸轨迹的方向对应的指令为向前切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的上一个页面的标识信息的页面加载脚本;或
    当所述预置触摸轨迹的方向对应的指令为向后切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的下一个页面的标识信息的页面加载脚本。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述目标页面加载脚本,显示切换后的页面包括:
    若不存在与所述当前页面的标识信息对应的上一个页面的标识信息或者下一个页面的标识信息,则显示当前页面。
  5. 根据权利要求4所述的方法,其特征在于,所述显示切换后的页面包括:
    根据预置播放效果,显示切换后的页面;
    根据所述当前页面的标识信息对应的上一个页面的标识信息或下一个页面的标识信息,对应更新所述浏览器标签底部状态栏的前进指令、后退 指令的显示状态。
  6. 根据权利要求2所述的方法,其特征在于,所述从缓存页面信息列表中获取与当前页面URL对应的页面标识信息之前,所述方法还包括:
    根据所述浏览器标签中对应的多个页面的添加顺序,为每一个页面配置页面的标识信息,并为每一个页面的标识信息分别配置对应的页面加载脚本、页面URL;
    将所述浏览器标签对应的每一个页面的标识信息和每一个页面的标识信息对应的页面加载脚本、页面URL缓存到所述缓存页面信息列表中。
  7. 根据权利要求6所述的方法,其特征在于,所述缓存页面信息列表中还缓存有每一个页面对应的是否支持预置触摸轨迹切换页面的结果。
  8. 根据权利要求1-7任一项所述方法,其特征在于,所述页面加载脚本为网页显示函数webview。
  9. 一种页面切换装置,包括:
    检测单元,用于检测是否接收到浏览器标签对应的预置触摸轨迹,所述预置触摸轨迹用于指示切换当前页面,所述浏览器标签对应多个页面;
    获取单元,用于若接收到浏览器标签对应的预置触摸轨迹,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息,所述缓存页面信息列表中缓存有所述浏览器标签对应的多个页面加载脚本,和与所述页面加载脚本对应的页面URL及页面标识信息;
    所述获取单元,还用于根据所述预置触摸轨迹的方向和所述当前页面的标识信息,从缓存页面信息列表中获取目标页面加载脚本;
    显示单元,用于根据所述目标页面加载脚本,显示切换后的页面。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:判断单元;
    所述判断单元,用于判断所述当前页面是否支持预置触摸轨迹切换页面;
    所述获取单元,具体用于若所述当前页面支持预置触摸轨迹切换页面,则从缓存页面信息列表中获取与当前页面URL对应的页面标识信息。
  11. 根据权利要求10所述的装置,其特征在于,
    所述获取单元,具体用于当所述预置触摸轨迹的方向对应的指令为向前切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的上一个页面的标识信息的页面加载脚本;
    所述获取单元,具体用于当所述预置触摸轨迹的方向对应的指令为向后切换页面时,则从所述缓存页面信息列表中获取与所述当前页面的标识信息对应的下一个页面的标识信息的页面加载脚本。
  12. 根据权利要求11所述的装置,其特征在于,
    所述显示单元,具体用于若不存在与所述当前页面的标识信息对应的上一个页面的标识信息或者下一个页面的标识信息,则显示当前页面。
  13. 根据权利要求12所述的装置,其特征在于,所述显示单元包括:
    显示模块,用于根据预置播放效果,显示切换后的页面;
    更新模块,用于根据所述当前页面的标识信息对应的上一个页面的标识信息或下一个页面的标识信息,对应更新所述浏览器标签底部状态栏的前进指令、后退指令的显示状态。
  14. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    配置单元,用于根据所述浏览器标签中对应的多个页面的添加顺序,为每一个页面配置页面的标识信息,并为每一个页面的标识信息分别配置对应的页面加载脚本、页面URL;
    缓存单元,用于将所述浏览器标签对应的每一个页面的标识信息和每一个页面的标识信息对应的页面加载脚本、页面URL缓存到所述缓存页面信息列表中。
  15. 根据权利要求14所述的装置,其特征在于,所述缓存页面信息列表中还缓存有每一个页面对应的是否支持预置触摸轨迹切换页面的结果。
  16. 根据权利要求9-15任一项所述装置,其特征在于,所述页面加载脚本为网页显示函数webview。
  17. 一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一个所述的页面切换方法。
  18. 一种可读介质,其中存储了如权利要求17所述的计算机程序。
PCT/CN2016/109993 2015-12-21 2016-12-15 页面切换方法、装置、计算机程序及可读介质 WO2017107834A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510969741.5A CN105426538B (zh) 2015-12-21 2015-12-21 页面切换方法及装置
CN201510969741.5 2015-12-21

Publications (1)

Publication Number Publication Date
WO2017107834A1 true WO2017107834A1 (zh) 2017-06-29

Family

ID=55504750

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/109993 WO2017107834A1 (zh) 2015-12-21 2016-12-15 页面切换方法、装置、计算机程序及可读介质

Country Status (2)

Country Link
CN (2) CN105426538B (zh)
WO (1) WO2017107834A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427622A (zh) * 2018-04-08 2018-08-21 平安普惠企业管理有限公司 一种内存管理方法、装置、计算机设备及存储介质
CN110119490A (zh) * 2019-04-18 2019-08-13 深圳壹账通智能科技有限公司 网页浏览方法、装置、计算机设备和存储介质
CN110276029A (zh) * 2019-05-20 2019-09-24 中国平安财产保险股份有限公司 Tab页面切换方法、电子装置及存储介质
CN110765377A (zh) * 2018-07-27 2020-02-07 北京华通人商用信息有限公司 一种数据加载方法和装置
CN112162677A (zh) * 2020-09-11 2021-01-01 北京浪潮数据技术有限公司 一种菜单页签定位方法、装置、设备及存储介质
CN113064802A (zh) * 2021-03-17 2021-07-02 平安普惠企业管理有限公司 操作轨迹还原方法、装置、设备及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528439B (zh) * 2015-12-21 2019-03-05 北京奇虎科技有限公司 浏览器标签内的页面切换方法及装置
CN105426538B (zh) * 2015-12-21 2019-02-12 北京奇虎科技有限公司 页面切换方法及装置
CN107870929A (zh) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 Hybrid框架下应用页面的翻页方法及系统
CN106445302A (zh) * 2016-09-30 2017-02-22 惠州Tcl移动通信有限公司 一种智能移动终端页面读取方法及系统
CN106775227B (zh) * 2016-12-06 2019-08-06 福建天泉教育科技有限公司 一种页面切换的方法及系统
CN107193880B (zh) * 2017-04-26 2020-05-19 北京潘达互娱科技有限公司 一种页面跳转方法与装置
CN108322359A (zh) * 2018-01-08 2018-07-24 阿里巴巴集团控股有限公司 一种页面首屏时间的获取方法和装置
CN111857855B (zh) * 2019-04-01 2021-10-29 南京星云数字技术有限公司 一种网页加载方法及其装置、智能设备
CN111831942A (zh) * 2019-04-15 2020-10-27 阿里巴巴集团控股有限公司 对搜索结果进行页面显示的方法、装置、电子设备
CN111857915B (zh) * 2020-07-06 2023-12-26 抖音视界有限公司 应用页面显示方法和装置
CN112163173B (zh) * 2020-09-22 2024-05-03 Oppo(重庆)智能科技有限公司 网页加载方法、装置、电子设备和计算机可读存储介质
CN112748843B (zh) * 2021-01-29 2022-06-03 腾讯科技(深圳)有限公司 页面切换方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855318A (zh) * 2012-08-31 2013-01-02 北京搜狗信息服务有限公司 网页预加载方法与系统
US20130145290A1 (en) * 2011-12-06 2013-06-06 Google Inc. Mechanism for switching between document viewing windows
CN103995660A (zh) * 2013-02-20 2014-08-20 腾讯科技(深圳)有限公司 触屏浏览器切换窗口的方法及装置
CN104679434A (zh) * 2015-03-17 2015-06-03 北京合生共济投资咨询有限责任公司 一种客户端页面的切换方法
CN105426538A (zh) * 2015-12-21 2016-03-23 北京奇虎科技有限公司 页面切换方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488411B (zh) * 2012-06-13 2016-06-01 腾讯科技(深圳)有限公司 切换页面的方法和装置
CN103309563B (zh) * 2013-06-28 2016-04-20 贝壳网际(北京)安全技术有限公司 已显示页面的切换方法及装置
CN104331260A (zh) * 2014-03-05 2015-02-04 广州三星通信技术研究有限公司 在屏幕上显示网页的方法及设备
CN104199603B (zh) * 2014-08-28 2017-11-07 北京金山安全软件有限公司 一种浏览器网页的控制方法、装置及终端
CN104461632B (zh) * 2014-12-09 2017-06-16 东软集团股份有限公司 一种Web App加载方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130145290A1 (en) * 2011-12-06 2013-06-06 Google Inc. Mechanism for switching between document viewing windows
CN102855318A (zh) * 2012-08-31 2013-01-02 北京搜狗信息服务有限公司 网页预加载方法与系统
CN103995660A (zh) * 2013-02-20 2014-08-20 腾讯科技(深圳)有限公司 触屏浏览器切换窗口的方法及装置
CN104679434A (zh) * 2015-03-17 2015-06-03 北京合生共济投资咨询有限责任公司 一种客户端页面的切换方法
CN105426538A (zh) * 2015-12-21 2016-03-23 北京奇虎科技有限公司 页面切换方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427622A (zh) * 2018-04-08 2018-08-21 平安普惠企业管理有限公司 一种内存管理方法、装置、计算机设备及存储介质
CN110765377A (zh) * 2018-07-27 2020-02-07 北京华通人商用信息有限公司 一种数据加载方法和装置
CN110765377B (zh) * 2018-07-27 2023-05-23 北京华通人商用信息有限公司 一种数据加载方法和装置
CN110119490A (zh) * 2019-04-18 2019-08-13 深圳壹账通智能科技有限公司 网页浏览方法、装置、计算机设备和存储介质
CN110276029A (zh) * 2019-05-20 2019-09-24 中国平安财产保险股份有限公司 Tab页面切换方法、电子装置及存储介质
CN112162677A (zh) * 2020-09-11 2021-01-01 北京浪潮数据技术有限公司 一种菜单页签定位方法、装置、设备及存储介质
CN113064802A (zh) * 2021-03-17 2021-07-02 平安普惠企业管理有限公司 操作轨迹还原方法、装置、设备及存储介质
CN113064802B (zh) * 2021-03-17 2023-02-07 平安普惠企业管理有限公司 操作轨迹还原方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN109697263A (zh) 2019-04-30
CN105426538B (zh) 2019-02-12
CN105426538A (zh) 2016-03-23

Similar Documents

Publication Publication Date Title
WO2017107834A1 (zh) 页面切换方法、装置、计算机程序及可读介质
WO2017107833A1 (zh) 浏览器标签内的页面切换方法及装置
US10191838B2 (en) Method and device for checking influence of deleting cache file, and mobile terminal
WO2016070726A1 (zh) 页面标签的加载方法、装置和浏览器客户端
CN105183760B (zh) 一种网页组件加载方法和装置
WO2016107325A1 (zh) 基于移动终端的页面资源加载方法及装置
US20180132012A1 (en) Method and apparatus for playing video in application program
WO2017000804A1 (zh) 移动终端新闻浏览的方法及装置
US20150058713A1 (en) Method and apparatus for sharing media content and method and apparatus for displaying media content
CN110333919B (zh) 一种呈现社交对象信息的方法与设备
CN107045546B (zh) 一种网页处理方法、装置及智能终端
KR20160059455A (ko) 웹 페이지 인코딩 인식 방법, 인식 장치, 프로그램 및 저장매체
WO2016015531A1 (zh) 一种信息处理方法及装置
CN111783015A (zh) 页面中共享显示元素的展示方法、电子设备及存储介质
WO2017008646A1 (zh) 一种在触控终端上选择多个目标的方法和设备
CN110806822B (zh) 电子书的交互方法、计算设备及计算机存储介质
WO2017107844A1 (zh) 显示信息的调整方法、装置、计算机程序及可读介质
US9946712B2 (en) Techniques for user identification of and translation of media
CN111459581B (zh) 页面切换方法、装置、电子设备及计算机可读介质
US20160196240A1 (en) Method of displaying content and electronic device implementing same
KR20170092260A (ko) 휴대용 영상 편집 장치 및 그 동작 방법
WO2017107887A1 (zh) 在移动终端上切换组图的方法及装置
US11036638B2 (en) Prefetching data for application usage
CN116661936A (zh) 页面数据的处理方法、装置、计算机设备及存储介质
EP3043252A1 (en) Method and electronic device for displaying electronic document

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16877645

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16877645

Country of ref document: EP

Kind code of ref document: A1