CN115952367A - A page display method, device and equipment - Google Patents
A page display method, device and equipment Download PDFInfo
- Publication number
- CN115952367A CN115952367A CN202211543526.5A CN202211543526A CN115952367A CN 115952367 A CN115952367 A CN 115952367A CN 202211543526 A CN202211543526 A CN 202211543526A CN 115952367 A CN115952367 A CN 115952367A
- Authority
- CN
- China
- Prior art keywords
- page
- target
- access path
- path information
- webpage
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本申请涉及网页技术领域,尤其涉及一种页面展示方法、装置及设备。The present application relates to the technical field of webpages, in particular to a method, device and equipment for displaying webpages.
背景技术Background technique
iframe元素是一种超文本标记语言(Hyper Text Markup Language,英文缩写HTML)标签,iframe元素可以用于创建包含另外一个文档的内联框架(即行内框架)。由于利用iframe元素可以便捷地在HTML文档(例如,网页)中嵌入另一个文档,因此,得到了广泛应用。不过,由于网页及iframe元素会共用浏览器历史记录信息,并且iframe元素在页面刷新后会重置,从而容易导致浏览器的前进、后退及刷新等功能失效,影响页面展示过程中的用户体验。The iframe element is a Hyper Text Markup Language (Hyper Text Markup Language, English abbreviation HTML) tag, and the iframe element can be used to create an inline frame (that is, an inline frame) that contains another document. Since another document can be conveniently embedded in an HTML document (for example, a web page) by using the iframe element, it has been widely used. However, since the webpage and iframe elements share browser history information, and the iframe element will be reset after the page is refreshed, it is easy to cause the browser's forward, backward, and refresh functions to fail, affecting the user experience during the page display process.
基于此,如何在保障浏览器功能正常运行的基础上,利用网页中的iframe元素去便捷地展示页面,成为了亟待解决的技术问题。Based on this, how to use the iframe element in the web page to conveniently display the page on the basis of ensuring the normal operation of the browser function has become an urgent technical problem to be solved.
发明内容Contents of the invention
本说明书实施例提供的一种页面展示方法、装置及设备,可以在保障浏览器功能正常运行的基础上,利用网页中的iframe元素去便捷地展示页面。The page display method, device and equipment provided in the embodiments of this specification can use the iframe element in the web page to conveniently display the page on the basis of ensuring the normal operation of the browser function.
为解决上述技术问题,本说明书实施例是这样实现的:In order to solve the above-mentioned technical problems, the embodiments of this specification are implemented as follows:
本说明书实施例提供的一种页面展示方法,包括:A page display method provided in the embodiment of this specification includes:
获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求;Obtain the user's page display request for the target page displayed in the iframe element on the web page;
响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息;In response to the page display request, determine the access path information of the target page according to the historical record information of the target browser; wherein, the historical record information of the target browser is based on the historical display process of the target page according to the Generated by the modified access path information of the webpage, the modified access path information is used to reflect the first access path information of the web page and the second access path information of the target page;
根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。According to the access path information of the target page, the target page is displayed in the iframe element on the webpage.
本说明书实施例提供的一种页面展示方法装置,包括:A page display method and device provided in an embodiment of this specification includes:
第一获取模块,用于获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求;The first obtaining module is used to obtain the user's page display request for the target page displayed in the iframe element at the web page;
访问路径确定模块,用于响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息;An access path determining module, configured to determine the access path information of the target page according to the target browser history record information in response to the page display request; wherein, the target browser history record information is in the target page Generated according to the modified access path information of the webpage during the history display process, the modified access path information is used to reflect the first access path information of the web page and the second access path information of the target page;
页面展示模块,用于根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。The page display module is configured to display the target page in the iframe element on the web page according to the access path information of the target page.
本说明书实施例提供的一种页面展示设备,包括:A page display device provided in an embodiment of this specification includes:
至少一个处理器;以及,at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to:
获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求;Obtain the user's page display request for the target page displayed in the iframe element on the web page;
响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息;In response to the page display request, determine the access path information of the target page according to the historical record information of the target browser; wherein, the historical record information of the target browser is based on the historical display process of the target page according to the Generated by the modified access path information of the webpage, the modified access path information is used to reflect the first access path information of the web page and the second access path information of the target page;
根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。According to the access path information of the target page, the target page is displayed in the iframe element on the webpage.
本说明书中提供的至少一个实施例能够实现以下有益效果:At least one embodiment provided in this specification can achieve the following beneficial effects:
在历史展示网页处的iframe元素中的目标页面的过程中,通过根据目标页面的第二访问路径信息对该网页的第一访问路径信息进行修改,以生成该网页的修改后访问路径信息,由于该网页的修改后访问路径信息可以用于反映该第一访问路径信息以及该第二访问路径信息,从而可以利用该网页去根据该网页的修改后访问路径信息生成目标浏览器历史记录信息,而不再利用iframe元素去生成浏览器历史记录信息,以避免网页与iframe元素共用浏览器历史记录信息。后续,当用户使用浏览器的前进、后退及刷新等功能,去基于该目标浏览器历史记录信息再次展示该目标页面时,可以根据该目标浏览器历史记录信息对应的该网页的修改后访问路径信息,去恢复出目标页面的访问路径信息,进而根据该目标页面的访问路径信息在该网页处的iframe元素中展示该目标页面,从而在保障浏览器的前进、后退及刷新功能正常运行的基础上,去利用网页中的iframe元素便捷地展示页面。In the process of historically displaying the target page in the iframe element at the web page, the first access path information of the web page is modified according to the second access path information of the target page to generate the modified access path information of the web page, because The modified access path information of the web page can be used to reflect the first access path information and the second access path information, so that the web page can be used to generate target browser history record information according to the modified access path information of the web page, and The iframe element is no longer used to generate browser history information, so as to avoid sharing browser history information between web pages and iframe elements. Subsequently, when the user uses the browser's forward, backward, and refresh functions to display the target page again based on the target browser's historical record information, the modified access path of the web page corresponding to the target browser's historical record information can be used. Information, to restore the access path information of the target page, and then display the target page in the iframe element of the web page according to the access path information of the target page, so as to ensure the normal operation of the browser's forward, backward and refresh functions On the Internet, use the iframe element in the web page to display the page conveniently.
附图说明Description of drawings
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in this application. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.
图1为本说明书实施例提供的一种页面展示方法的流程示意图;FIG. 1 is a schematic flowchart of a page display method provided by an embodiment of this specification;
图2为本说明书实施例提供的一种网页处的iframe元素中的目标页面的示意图;FIG. 2 is a schematic diagram of a target page in an iframe element at a web page provided by an embodiment of this specification;
图3为本说明书实施例提供的对应于图1中的页面展示方法的泳道流程示意图;Fig. 3 is a schematic diagram of the swimming lane process corresponding to the page display method in Fig. 1 provided by the embodiment of this specification;
图4为本说明书实施例提供的对应于图1的一种页面展示装置的结构示意图;Fig. 4 is a schematic structural diagram of a page display device corresponding to Fig. 1 provided by the embodiment of this specification;
图5为本说明书实施例提供的对应于图1的一种页面展示设备的结构示意图。FIG. 5 is a schematic structural diagram of a page display device corresponding to FIG. 1 provided by the embodiment of this specification.
具体实施方式Detailed ways
为使本说明书一个或多个实施例的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书一个或多个实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本说明书一个或多个实施例保护的范围。In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification more clear, the following will clearly and completely describe the technical solutions of one or more embodiments of this specification in conjunction with specific embodiments of this specification and corresponding drawings . Apparently, the described embodiments are only some of the embodiments in this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of one or more embodiments in this specification.
以下结合附图,详细说明本说明书各实施例提供的技术方案。The technical solutions provided by each embodiment of this specification will be described in detail below in conjunction with the accompanying drawings.
现有技术中,由于在使用原生的iframe元素去在网页中展示其他网站或系统处的页面的过程中,不仅可能会针对该网页生成一条浏览器历史记录信息(history),还可能会针对iframe元素生成其他浏览器历史记录信息(history),从而使得网页及iframe元素会共用浏览器历史记录信息,容易导致用户后续无法利用浏览器的前进、后退等功能实现完整的历史浏览页面的跳转,因此,在使用iframe元素的过程中可能会存在浏览器的前进、后退等功能失效的问题。In the prior art, in the process of using the original iframe element to display the pages of other websites or systems in the webpage, not only a browser history record information (history) may be generated for the webpage, but also a browser history information (history) may be generated for the iframe The element generates other browser history information (history), so that the web page and the iframe element will share the browser history information, which will easily cause the user to be unable to use the browser's forward, backward and other functions to achieve a complete historical browsing page jump. Therefore, in the process of using the iframe element, there may be a problem that the forward and backward functions of the browser become invalid.
除此之外,由于用户在使用浏览器的刷新功能对网页进行刷新后,该网页处的iframe元素的统一资源定位符信息(uniform resource locator,英文缩写URL)会进行重置,从而无法继续展示该iframe元素在网页刷新之前正在展示的页面内容,导致用户在使用iframe元素的过程中可能会存在浏览器的刷新功能失效的问题。In addition, after the user refreshes the webpage using the browser's refresh function, the uniform resource locator information (uniform resource locator, English abbreviation URL) of the iframe element at the webpage will be reset, so that the display cannot continue. The iframe element is displaying the page content before the webpage is refreshed, which may cause the problem that the refresh function of the browser may be invalid when the user uses the iframe element.
基于此,如何在保障浏览器的前进、后退及刷新等功能正常运行的基础上,利用网页中的iframe元素去便捷地展示页面,成为了亟待解决的技术问题。Based on this, how to use the iframe element in the webpage to conveniently display the page on the basis of ensuring the normal operation of the forward, backward and refresh functions of the browser has become a technical problem to be solved urgently.
为了解决现有技术中的缺陷,本方案给出了以下实施例:In order to solve the defects in the prior art, this program provides the following embodiments:
图1为本说明书实施例提供的一种页面展示方法的流程示意图。从程序角度而言,该流程的执行主体可以为用于展示网页处的iframe元素中的目标页面的终端设备,或者,所述终端设备处的应用程序。如图1所示,该流程可以包括以下步骤:FIG. 1 is a schematic flow chart of a page display method provided by an embodiment of this specification. From a program point of view, the subject of execution of this process may be a terminal device for displaying a target page in an iframe element on a web page, or an application program on the terminal device. As shown in Figure 1, the process may include the following steps:
步骤102:获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求。Step 102: Obtain a user's page display request for the target page displayed in the iframe element on the web page.
本说明书实施例中,网页又称为Web网页(web page),可以指一个按照超文本标记语言(Hyper Text Markup Language,英文缩写HTML)格式组织起来的文件,用户可以在浏览器或Web应用程序中打开网页,以查阅网页中的内容,或者,利用网页处的控件办理业务。其中,Web应用程序是一种可以通过Web访问的应用程序,由于用户只需要有浏览器即可打开Web应用程序,而不需要再安装其他软件,使用便捷性较好。In the embodiment of this specification, a web page is also called a Web page (web page), which can refer to a file organized in the format of Hyper Text Markup Language (HTML), and the user can view it in a browser or a Web application program. Open the webpage in the webpage to view the content in the webpage, or use the controls on the webpage to handle business. Wherein, the web application program is an application program that can be accessed through the web. Since the user only needs to have a browser to open the web application program without installing other software, it is more convenient to use.
iframe元素是一种超文本标记语言(Hyper Text Markup Language,英文缩写HTML)标签,iframe元素可以用于创建包含另外一个文档的内联框架(即行内框架)。开发者通常需要预先在所述网页处嵌入iframe元素,以便于用户在访问所述网页时,可以通过触发所述iframe元素去展示目标页面。The iframe element is a Hyper Text Markup Language (Hyper Text Markup Language, English abbreviation HTML) tag, and the iframe element can be used to create an inline frame (that is, an inline frame) that contains another document. Developers generally need to pre-embed an iframe element at the webpage, so that when a user visits the webpage, the target page can be displayed by triggering the iframe element.
本说明书实施例中,用户在执行步骤102之前通常已经执行过用于展示目标页面的操作,并且浏览器或Web应用程序响应于该操作对目标页面进行了展示,使得浏览器或Web应用程序处具有与展示过的目标页面对应的目标浏览器历史记录信息。从而使得用户可以通常触发浏览器前进控件、浏览器后退控件及浏览器刷新控件中的任意一种去生成步骤102中的页面展示请求。即步骤102中的页面展示请求可以是用于请求利用浏览器历史记录信息去对展示过的目标页面进行再次展示的请求。In the embodiment of this specification, the user has usually performed an operation for displaying the target page before performing
为便于理解,图2为本说明书实施例提供的一种网页处的iframe元素中的目标页面的示意图,如图2所示,网页201中可以设置有iframe元素202,若用户曾在iframe元素202中展示了目标页面,则用户可以通过触发浏览器后退控件203、浏览器前进控件204及浏览器刷新控件205中的至少一项,去令设备获取到该用户针对网页201处的iframe元素202中展示过的目标页面的页面展示请求。For ease of understanding, FIG. 2 is a schematic diagram of a target page in an iframe element at a webpage provided by an embodiment of this specification. As shown in FIG. 2 , an
在实际应用中,网页201中还可以显示有地址栏206以及滚动条207,从而通过地址栏206去展示网页和/或iframe元素202中展示的目标页面的访问路径信息,以及,通过滚动条去令用户可以拖动网页210和/或iframe元素202中展示的目标页面,从而浏览更多的页面信息。In practical applications, an
步骤104:响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息。Step 104: In response to the page presentation request, determine the access path information of the target page according to the target browser history record information; wherein, the target browser history record information is during the history display process of the target page Generated according to the modified access path information of the webpage, the modified access path information is used to reflect the first access path information of the web page and the second access path information of the target page.
本说明书实施例中,所述目标浏览器历史记录信息通常为针对已展示过的目标页面生成的浏览器历史记录信息。其中,浏览器历史记录信息可以为history对象,其可以用于记录用户曾经浏览过的页面的访问路径信息(例如,URL路径及URL参数),从而使得用户可以利用浏览器历史记录信息实现浏览器的前进、后退及刷新功能。In this embodiment of the specification, the target browser history record information is usually browser history record information generated for the displayed target page. Wherein, the browser history record information can be a history object, which can be used to record the access path information (for example, URL path and URL parameters) of the pages that the user has browsed, so that the user can use the browser history record information to implement browser forward, backward and refresh functions.
本说明书实施例中,当在网页处的iframe元素中展示目标页面时,该网页通常可以具有第一访问路径信息,而iframe元素中展示的目标页面通常可以具有第二访问路径信息。为避免iframe元素与网页共用浏览器历史记录信息,并且保障可以根据浏览器历史记录信息去恢复出iframe元素中展示的目标页面中的页面信息,可以在历史展示目标页面的过程中,根据所述目标页面的第二访问路径信息对所述网页的第一访问路径信息进行修改,从而令所述网页的修改后访问路径信息能够同时反映所述第二访问路径信息与所述第一访问路径信息,此时,由于所述网页的访问路径信息发生了变更,从而能够令所述网页可以去利用所述网页的修改后访问路径信息生成一条目标浏览器历史记录信息,而无需再单独针对iframe元素中的目标页面的第二访问路径信息去生成一条浏览器历史记录信息。In the embodiment of the present specification, when a target page is displayed in an iframe element on a web page, the web page may generally have first access path information, and the target page displayed in the iframe element may generally have second access path information. In order to prevent the iframe element from sharing the browser history information with the webpage, and ensure that the page information in the target page displayed in the iframe element can be restored according to the browser history information, you can display the target page in the history, according to the The second access path information of the target page modifies the first access path information of the web page, so that the modified access path information of the web page can simultaneously reflect the second access path information and the first access path information , at this time, since the access path information of the web page has changed, the web page can use the modified access path information of the web page to generate a piece of target browser history record information, without having to target the iframe element separately The second access path information of the target page is used to generate a piece of browser history record information.
本说明书实施例中,由于所述目标浏览器历史记录信息可以用于记录所述网页的修改后访问路径信息,而所述修改后访问路径信息可以用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息,从而可以利用所述目标浏览器历史记录信息,确定出所述目标页面的访问路径信息。其中,所述目标页面的访问路径信息可以为针对已展示过的所述目标页面中的具体页面信息的访问路径信息。In the embodiment of this specification, since the target browser history record information can be used to record the modified access path information of the web page, and the modified access path information can be used to reflect the first access path information of the web page and the second access path information of the target page, so that the target browser history record information can be used to determine the access path information of the target page. Wherein, the access path information of the target page may be access path information for specific page information in the target page that has been displayed.
步骤106:根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。Step 106: Display the target page in the iframe element on the webpage according to the access path information of the target page.
本说明书实施例中,可以根据所述目标页面的访问路径信息去获取已展示过的目标页面的页面数据,通过将获取到的页面数据展示于所述网页处的所述iframe元素中,以令用户可以通常触发浏览器前进控件、浏览器后退控件或浏览器刷新控件,去在所述网页处的所述iframe元素中去对所述目标页面中的具体内容进行再次展示。In the embodiment of this specification, the page data of the target page that has been displayed can be obtained according to the access path information of the target page, and the obtained page data is displayed in the iframe element of the web page, so that The user can usually trigger the browser forward control, browser back control or browser refresh control to display the specific content in the target page again in the iframe element at the web page.
图1中的方法,在历史展示网页处的iframe元素中的目标页面的过程中,通过根据目标页面的第二访问路径信息对该网页的第一访问路径信息进行修改,以生成该网页的修改后访问路径信息,由于该网页的修改后访问路径信息可以用于反映该第一访问路径信息以及该第二访问路径信息,从而可以利用该网页去根据该网页的修改后访问路径信息生成该网页的目标浏览器历史记录信息,而不再利用iframe元素去生成浏览器历史记录信息,以避免网页及iframe元素共用浏览器历史记录信息。后续,当用户使用浏览器的前进、后退及刷新等功能,去基于该目标浏览器历史记录信息再次展示该目标页面时,可以根据该目标浏览器历史记录信息对应的该网页的修改后访问路径信息,去恢复出目标页面的访问路径信息,进而根据该目标页面的访问路径信息在该网页处的iframe元素中展示该目标页面,从而在保障浏览器的前进、后退及刷新功能正常运行的基础上,去利用网页中的iframe元素便捷地展示页面。The method in Figure 1, in the process of historically displaying the target page in the iframe element at the web page, modifying the first access path information of the web page according to the second access path information of the target page to generate a modification of the web page access path information, since the modified access path information of the web page can be used to reflect the first access path information and the second access path information, the web page can be used to generate the web page according to the modified access path information of the web page The target browser history record information, instead of using the iframe element to generate browser history record information, to avoid sharing browser history record information between web pages and iframe elements. Subsequently, when the user uses the browser's forward, backward, and refresh functions to display the target page again based on the target browser's historical record information, the modified access path of the web page corresponding to the target browser's historical record information can be used. Information, to restore the access path information of the target page, and then display the target page in the iframe element of the web page according to the access path information of the target page, so as to ensure the normal operation of the browser's forward, backward and refresh functions On the Internet, use the iframe element in the web page to display the page conveniently.
基于图1中的方法,本说明书实施例还提供了该方法的一些具体实施方案,下面进行说明。Based on the method in FIG. 1 , the embodiment of this specification also provides some specific implementations of the method, which will be described below.
为便于理解,在此针对目标浏览器历史记录信息的生成原理进行解释说明。For ease of understanding, the principle of generating the history record information of the target browser is explained here.
具体的,步骤102:获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求之前,还可以包括:Specifically, before step 102: obtaining the user's page display request for the target page displayed in the iframe element on the web page, it may also include:
获取针对已展示的所述目标页面的浏览器历史记录生成请求。Get browser history generation request for said target page shown.
响应于所述浏览器历史记录生成请求,根据所述目标页面的第二访问路径信息,对所述网页的第一访问路径信息进行修改,得到所述网页的修改后访问路径信息。In response to the browser history record generation request, modify the first access path information of the webpage according to the second access path information of the target page to obtain the modified access path information of the web page.
根据所述网页的修改后访问路径信息,生成所述目标浏览器历史记录信息。The target browser history record information is generated according to the modified access path information of the webpage.
本说明书实施例中,当用户直接在地址栏输入网页地址,或者,通过点击网页内的超链接而跳转到其它网页,或者,通过脚本改变location.href跳转到其它网页,或者,通过表单提交跳转到其它网页时,浏览器通常会利用浏览器历史记录信息把改变后的网页记录下来,以便用户通过浏览器的前进、后退等按钮,能够快速的切换到已经访问过的网页。基于此,当用户在终端设备处针对目标页面执行上述操作后,终端设备通常可以获取到针对已展示的所述目标页面的浏览器历史记录生成请求。在实际应用中,由于页面资源加载及渲染所需耗费的时间并不一致,因此,终端设备在获取到所述浏览器历史记录生成请求时,终端设备既可能已经展示出了该目标页面,也可能还未展示出该目标页面,对此不作具体限定。In the embodiment of this specification, when the user directly enters the webpage address in the address bar, or jumps to other webpages by clicking a hyperlink in the webpage, or jumps to other webpages by changing location.href through a script, or, through a form When submitting to jump to other webpages, the browser usually uses the browser history information to record the changed webpage, so that the user can quickly switch to the visited webpage through the browser's forward and back buttons. Based on this, after the user performs the above operation on the target page at the terminal device, the terminal device can usually obtain a browser history record generation request for the displayed target page. In practical applications, since the time required for page resource loading and rendering is not consistent, when the terminal device obtains the browser history record generation request, the terminal device may have already displayed the target page, or may The target page has not been displayed yet, and is not specifically limited.
本说明书实施例中,由于在利用iframe元素展示目标页面时,iframe元素具有自行调用浏览器处的函数去生成浏览器历史记录信息的能力,因此,为避免iframe元素与网页共用浏览器历史记录信息导致的浏览器前进、后退功能失效,可以拦截iframe元素通过调用用于生成浏览器历史记录信息的函数而生成的浏览器历史记录生成请求,以禁止生成该iframe元素的浏览器历史记录信息。In the embodiment of this specification, when the iframe element is used to display the target page, the iframe element has the ability to call the function at the browser to generate the browser history information. Therefore, in order to prevent the iframe element from sharing the browser history information with the web page As a result, the forward and backward functions of the browser are invalid, and the browser history record generation request generated by the iframe element by calling a function for generating browser history record information can be intercepted, so as to prohibit the generation of the browser history record information of the iframe element.
并且,还可以根据所述目标页面的第二访问路径信息对网页的第一访问路径信息进行修改,以令该网页的修改后访问路径信息能够同时反映上述两种访问路径信息,此时,由于网页的访问路径信息发生了变动,从而使得该网页会去调用用于生成浏览器历史记录信息的函数,以根据该网页的修改后访问路径信息生成该网页的目标浏览器历史记录信息。In addition, the first access path information of the web page can also be modified according to the second access path information of the target page, so that the modified access path information of the web page can reflect the above two types of access path information at the same time. The access path information of the webpage has changed, so that the webpage will call a function for generating browser history record information, so as to generate the target browser history record information of the webpage according to the modified access path information of the webpage.
基于此,本说明书实施例中浏览器处的各个浏览器历史记录信息均由网页调用相应函数而生成的,从而可以避免iframe元素与网页共用浏览器历史记录信息。同时,由于该网页生成的目标浏览器历史记录信息可以同时用于反映该网页及iframe元素处的目标页面的访问路径信息,从而后续可以根据目标浏览器历史记录信息恢复出该网页及iframe元素处的目标页面的访问路径信息,进而对该网页及该目标页面进行再次展示,以保障浏览器前进、后退、刷新等功能的正常运行。Based on this, each browser history record information at the browser in the embodiment of this specification is generated by calling a corresponding function from the webpage, so that the browser history record information shared by the iframe element and the webpage can be avoided. At the same time, since the target browser history information generated by the web page can be used to reflect the access path information of the target page at the web page and the iframe element at the same time, the web page and the iframe element at the location can be restored subsequently according to the target browser history information. The access path information of the target page of the browser, and then display the web page and the target page again, so as to ensure the normal operation of the browser's forward, backward, refresh and other functions.
本说明书实施例中,为便于理解,在此针对网页的修改后访问路径信息的生成过程进行解释说明。In the embodiment of this specification, for the sake of understanding, the process of generating the modified access path information of the webpage is explained here.
所述响应于所述浏览器历史记录生成请求,根据目标页面的第二访问路径信息,对网页的第一访问路径信息进行修改,得到所述网页的修改后访问路径信息,具体可以包括:In response to the browser history record generation request, according to the second access path information of the target page, the first access path information of the webpage is modified to obtain the modified access path information of the web page, which may specifically include:
获取所述网页的统一资源定位符信息。Obtain uniform resource locator information of the webpage.
获取所述目标页面相对于所述网页的相对路径信息以及所述目标页面的路径参数信息。Obtain relative path information of the target page relative to the web page and path parameter information of the target page.
对所述网页的统一资源定位符信息、所述相对路径信息及所述路径参数信息进行拼接,得到所述网页的修改后访问路径信息。Splicing the uniform resource locator information of the webpage, the relative path information and the path parameter information to obtain the modified access path information of the webpage.
本说明书实施例中,绝对路径可以指从电脑盘符或者域名开始找到文件的完整的路径,绝对路径可以用于描述一个文件其各层目录的完整结构。而相对路径可以指以某个文件作为起点去查找另外的一个文件的所在位置的路径,相对路径可以用于反映某个文件所在的路径跟其它文件之间的路径关系。In the embodiment of this specification, an absolute path may refer to a complete path to find a file starting from a computer drive letter or a domain name, and an absolute path may be used to describe the complete structure of a file's directories at various levels. A relative path can refer to a path that uses a certain file as a starting point to find the location of another file, and a relative path can be used to reflect the path relationship between the path where a certain file is located and other files.
本说明书实施例中,网页的第一访问路径信息可以为绝对路径,比如,该网页的统一资源定位符信息(URL地址信息),而目标页面的第二访问路径信息可以为该目标页面相对于该网页的相对路径信息以及所述目标页面的路径参数信息,其中,所述目标页面的路径参数信息可以为URL参数(Query)。In this embodiment of the specification, the first access path information of a webpage may be an absolute path, for example, the uniform resource locator information (URL address information) of the webpage, and the second access path information of the target page may be the relative path of the target page. The relative path information of the webpage and the path parameter information of the target page, wherein the path parameter information of the target page may be a URL parameter (Query).
为便于理解,对此进行举例说明,例如,当网页与该网页处的iframe元素中展示的目标页面同源时,假定,网页的统一资源定位符信息可以为“http://www.a.com/”,而目标页面的绝对路径可以为“http://www.a.com/w/b.html”,则该目标页面相对于该网页的相对路径信息可以为“w/b.html”,除此之外,所述目标页面还可以具有路径参数信息“?id=123”。基于此,对所述网页的统一资源定位符信息、所述相对路径信息及所述路径参数信息进行拼接,得到的所述网页的修改后访问路径信息可以为“http://www.a.com/w/b.html?id=123”。For ease of understanding, an example is used to illustrate this. For example, when the webpage is of the same source as the target page displayed in the iframe element of the webpage, it is assumed that the uniform resource locator information of the webpage can be "http://www.a. com/", and the absolute path of the target page can be "http://www.a.com/w/b.html", then the relative path information of the target page relative to the webpage can be "w/b.html ", in addition, the target page may also have path parameter information "?id=123". Based on this, the uniform resource locator information of the webpage, the relative path information and the path parameter information are spliced, and the obtained modified access path information of the webpage can be "http://www.a. com/w/b.html?id=123".
或者,当网页与该网页处的iframe元素中展示的目标页面不同源时,假定,网页的统一资源定位符信息可以为“http://www.a.com/”,而所述网页处的iframe元素中展示的目标页面的绝对路径可以为“http://www.b.com/w/c.html”,此时,该目标页面相对于该网页的相对路径信息可以为预设路径“d.html”,此时,需要保存该相对路径信息、网页的统一资源定位符信息以及目标页面的绝对路径三者之间的对应关系,除此之外,所述目标页面还可以具有路径参数信息“?id=123”。基于此,对所述网页的统一资源定位符信息、所述相对路径信息及所述路径参数信息进行拼接,得到的网页的修改后访问路径信息可以为“http://www.a.com/d.html?id=123”。Or, when the source of the web page is different from the target page displayed in the iframe element at the web page, it is assumed that the uniform resource locator information of the web page may be "http://www.a.com/", and the The absolute path of the target page displayed in the iframe element can be "http://www.b.com/w/c.html", at this time, the relative path information of the target page relative to the web page can be the preset path " d.html", at this time, it is necessary to save the corresponding relationship among the relative path information, the uniform resource locator information of the web page and the absolute path of the target page. In addition, the target page can also have path parameters message "?id=123". Based on this, the uniform resource locator information of the webpage, the relative path information and the path parameter information are spliced, and the modified access path information of the obtained webpage can be "http://www.a.com/ d.html?id=123".
后续,当根据网页的修改后访问路径信息去再次展示目标页面时,需要先根据预先保存的所述网页的统一资源定位符信息、所述目标页面的绝对路径以及所述相对路径信息三者之间的对应关系,从网页的修改后访问路径信息提取出相对路径信息“d.html”,再确定与相对路径信息“d.html”对应的目标页面的绝对路径“http://www.b.com/w/c.html”,以及从网页的修改后访问路径信息提取出路径参数信息“?id=123”,从而可以根据得到的目标页面的绝对路径以及提取出路径参数信息去展示曾经展示过的目标页面,避免目标页面的页面状态丢失问题。Subsequently, when displaying the target page again according to the modified access path information of the web page, it is necessary to firstly display the target page based on the pre-saved URL information of the web page, the absolute path of the target page, and the relative path information. The corresponding relationship between them, the relative path information "d.html" is extracted from the modified access path information of the web page, and then the absolute path "http://www.b" of the target page corresponding to the relative path information "d.html" is determined .com/w/c.html", and extract the path parameter information "?id=123" from the modified access path information of the webpage, so that the display can be displayed according to the obtained absolute path of the target page and the extracted path parameter information The displayed target page avoids the loss of the page state of the target page.
在实际应用中,在利用iframe元素展示目标页面时,iframe元素通常具有自行调用浏览器处的函数去生成浏览器历史记录信息的能力,因此,需要拦截iframe元素的相关函数调用操作,并利用网页去执行相关函数调用操作,以避免iframe元素与网页共用浏览器历史记录信息。In practical applications, when using the iframe element to display the target page, the iframe element usually has the ability to call the function at the browser to generate the browser history information. Therefore, it is necessary to intercept the related function call operation of the iframe element and use the webpage To perform related function calls to avoid sharing browser history information between iframe elements and web pages.
基于此,获取针对已展示的所述目标页面的浏览器历史记录生成请求,具体可以包括:Based on this, obtaining a browser history generation request for the displayed target page may specifically include:
检测所述目标页面针对pushState函数的第一调用请求。Detecting the first calling request of the target page for the pushState function.
对应的,根据网页的修改后访问路径信息,生成目标浏览器历史记录信息,可以包括:Correspondingly, according to the modified access path information of the webpage, the historical record information of the target browser is generated, which may include:
利用所述网页生成携带有所述修改后访问路径信息的针对所述pushState函数的第二调用请求。Using the webpage to generate a second call request for the pushState function carrying the modified access path information.
响应于所述第二调用请求,根据所述修改后访问路径信息,生成所述目标浏览器历史记录信息。In response to the second call request, the target browser history record information is generated according to the modified access path information.
本说明书实施例中,pushState函数(即history.pushState函数/方法)可以为用于添加浏览器历史记录的应用程序编程接口(Application Program Interface,英文缩写API)。在实际应用中,pushState函数通常可以接受state、title及url等三项参数,其中,state可以为一个与指定网址相关的状态对象,popstate事件触发时,该对象会传入回调函数。如果不需要这个对象,此处可以填null。title可以为新页面的标题,不过目前浏览器通常会忽略这个值,因此这里可以填null。url可以为新展示的页面的访问地址信息。In the embodiment of this specification, the pushState function (that is, the history.pushState function/method) may be an application programming interface (Application Program Interface, English abbreviation API) for adding browser history records. In practical applications, the pushState function usually accepts three parameters: state, title, and url. Among them, state can be a state object related to the specified URL. When the popstate event is triggered, the object will be passed into the callback function. If you don't need this object, you can fill in null here. title can be the title of the new page, but currently browsers usually ignore this value, so you can fill in null here. The url may be access address information of a newly displayed page.
由于iframe元素在展示目标页面后,通常会调用pushState函数,以请求生成一条针对目标页面的浏览器历史记录,因此,可以检测并拦截所述目标页面针对pushState函数的第一调用请求,以及,在拦截到第一调用请求后,还可以禁止继续对第一调用请求进行处理,以禁止iframe元素通过调用pushState函数自行生成浏览器历史记录。从而避免frame元素与网页共用浏览器历史记录信息。Since the iframe element usually calls the pushState function to request to generate a browser history record for the target page after displaying the target page, it is possible to detect and intercept the first call request of the target page for the pushState function, and, in After the first call request is intercepted, it is also possible to forbid further processing of the first call request, so as to prohibit the iframe element from generating browser history records by calling the pushState function. This prevents the frame element from sharing browser history information with the web page.
除此之外,为记录用户对于iframe元素中的目标页面的访问行为,以及便于后续用户利用浏览器历史记录去再次展示曾展示过的目标页面,在检测并拦截iframe元素中的目标页面针对pushState函数的第一调用请求后,会根据目标页面的第二访问路径信息修改网页的第一访问路径信息,以得到能够同时反映该第一访问路径信息及该第二访问路径信息的修改后访问路径信息。此时,由于网页的访问路径信息改变,因此,网页会去发起针对pushState函数的第二调用请求,且该第二调用请求中可以携带有该网页的修改后访问路径信息以作为pushState函数的入参。后续,可以允许对第二调用请求进行处理,从而令该网页通过调用pushState函数自行生成用于反映该修改后访问路径信息的目标浏览器历史记录信息。In addition, in order to record the user's access behavior to the target page in the iframe element, and to facilitate subsequent users to use the browser history to re-display the previously displayed target page, the target page in the iframe element is detected and intercepted for pushState After the first call request of the function, the first access path information of the webpage will be modified according to the second access path information of the target page to obtain a modified access path that can reflect both the first access path information and the second access path information information. At this time, since the access path information of the web page changes, the web page will initiate a second call request for the pushState function, and the second call request may carry the modified access path information of the web page as the input of the pushState function. ginseng. Subsequently, the second call request may be allowed to be processed, so that the web page can generate target browser history record information reflecting the modified access path information by itself by calling the pushState function.
本说明书实施例中,图1中的方法可以用于令用户通过触发浏览器前进控件、浏览器后退控件或浏览器刷新控件,而基于浏览器历史记录信息去再次展示目标页面。因此,可以通过检测针对上述控件的触发事件而获取到步骤102中提及的页面展示请求。In the embodiment of this specification, the method in FIG. 1 can be used to enable the user to display the target page again based on the browser history information by triggering the browser forward control, browser back control or browser refresh control. Therefore, the page presentation request mentioned in
基于此,步骤102:获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求,可以包括:Based on this, step 102: obtaining the user's page display request for the target page displayed in the iframe element at the web page may include:
检测用于展示所述目标页面的popState事件;或者,detecting a popState event for displaying said target page; or,
检测用于展示所述目标页面的beforeunload事件。Detect the beforeunload event for displaying said target page.
本说明书实施例中,在浏览器相关技术中,用于存储浏览器历史记录信息的数据结构可以称为历史记录栈,并且可以通过访问指针来表示浏览器处当前展示的页面在历史记录栈中的位置。当我们使用浏览器的前进、后退功能时,通常不会改变历史记录栈的内容,但会移动一下这个访问指针的位置,使得浏览器可以根据移动后的指针位置对应的浏览器历史记录信息去进行页面显示。In the embodiment of this specification, in browser-related technologies, the data structure used to store browser history information can be called a history stack, and an access pointer can be used to indicate that the page currently displayed at the browser is in the history stack s position. When we use the forward and backward functions of the browser, the content of the history stack will not usually be changed, but the position of the access pointer will be moved, so that the browser can go to the corresponding browser history record information according to the moved pointer position. Display the page.
在实际应用中,由于用户在触发浏览器前进控件或者浏览器后退控件后,或者,在用户调用history对象的back、forward、go方法后,通常会触发用于移动历史记录栈处的访问指针所在位置的popstate事件,因此,若检测到用于展示目标页面的popState事件,则可以视为接收到了针对网页处的iframe元素中展示过的目标页面的页面展示请求。In practical applications, after the user triggers the browser forward control or the browser back control, or after the user calls the back, forward, and go methods of the history object, the access pointer used to move the history stack is usually triggered. Therefore, if the popState event for displaying the target page is detected, it can be regarded as having received a page display request for the target page displayed in the iframe element on the web page.
本说明书实施例中,当用户刷新浏览器处当前展示的页面时,通常会触发beforeunload事件,若用户需要继续浏览当前展示的页面,则可以基于浏览器历史记录信息再次展示该页面。因此,若浏览器处的iframe元素当前展示有目标页面,并且检测到用于刷新页面的beforeunload事件,则也可以视为接收到了针对网页处的iframe元素中展示过的目标页面的页面展示请求。In the embodiment of this specification, when the user refreshes the currently displayed page in the browser, the beforeunload event is usually triggered. If the user needs to continue browsing the currently displayed page, the page can be displayed again based on the browser history information. Therefore, if the iframe element at the browser currently displays a target page and detects a beforeunload event for refreshing the page, it may also be regarded as having received a page display request for the target page displayed in the iframe element at the web page.
本说明书实施例中,用户在利用浏览器的前进、后退功能再次展示网页处的iframe元素中的目标目标页面时,若浏览器当前展示的页面也属于网页处的该iframe元素中的页面,此时,浏览器通常已经在dom中创建了该iframe元素,若继续在已创建的iframe元素中去展示目标页面,则需要将已创建的iframe元素处设置的URL变更为目标页面对应的URL,这会引起iframe元素自行调用pushState函数以生成浏览器历史记录信息的行为,从而导致iframe元素与网页共用浏览器历史记录信息的问题。In the embodiment of this specification, when the user uses the forward and backward functions of the browser to display the target target page in the iframe element at the webpage again, if the page currently displayed by the browser also belongs to the page in the iframe element at the webpage, then At the time, the browser usually has created the iframe element in the dom. If you want to continue to display the target page in the created iframe element, you need to change the URL set in the created iframe element to the URL corresponding to the target page. It will cause the behavior of the iframe element to call the pushState function to generate the browser history information by itself, thus causing the problem that the iframe element and the web page share the browser history information.
基于此,为避免iframe元素与网页共用浏览器历史记录信息,所述根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面,具体可以包括:Based on this, in order to avoid iframe element and webpage share browser history record information, described according to the access path information of described target page, display described target page in described iframe element at described webpage place, specifically can comprise:
若所述网页处具有已创建的所述iframe元素,则销毁所述已创建的所述iframe元素。If the created iframe element exists on the web page, destroy the created iframe element.
根据所述目标页面的访问路径信息,创建用于展示所述目标页面的新增iframe元素。Create a newly added iframe element for displaying the target page according to the access path information of the target page.
本说明书实施例中,由于针对新创建的iframe元素设置URL时,iframe元素不会去调用pushState函数以生成浏览器历史记录,因此,当根据目标浏览器历史记录信息确定出需要在iframe元素中进行展示的目标页面的访问路径信息后,可以去检测是否已在dom中创建了该iframe元素,若是,则该iframe元素处通常已经设置了其他页面的URL,因此,为避免去变更iframe元素处设置的URL,可以删除已创建的iframe元素,然后,在dom中新创建一个iframe元素,并根据目标页面的访问路径信息设置新创建的iframe元素处的URL,从而既能保障iframe元素中的目标页面的正常展示,又能避免iframe元素去调用pushState函数以自行生成浏览器历史记录,从而解决iframe元素与网页共用浏览器历史记录信息而可能带来的问题。In the embodiment of this specification, since the iframe element will not call the pushState function to generate the browser history record when setting the URL for the newly created iframe element, when it is determined according to the target browser history record information that it needs to be performed in the iframe element After displaying the access path information of the target page, you can check whether the iframe element has been created in the dom. If so, the iframe element is usually set with the URL of other pages. Therefore, in order to avoid changing the setting of the iframe element URL, you can delete the created iframe element, then create a new iframe element in the dom, and set the URL at the newly created iframe element according to the access path information of the target page, so as to ensure that the target page in the iframe element It can avoid the iframe element to call the pushState function to generate the browser history record by itself, so as to solve the possible problems caused by the iframe element and the web page sharing the browser history record information.
在实际应用中,由于人们通常需要以硬编码的方式将iframe元素的尺寸写入程序代码中,从而使得iframe元素的尺寸较为固定,导致iframe元素与其展示的目标页面之间的适配性较差,影响用户体验。In practical applications, because people usually need to write the size of the iframe element into the program code in a hard-coded manner, the size of the iframe element is relatively fixed, resulting in poor adaptability between the iframe element and the target page it displays , affecting user experience.
基于此,所述根据所述目标页面的访问路径信息,创建用于展示所述目标页面的新增iframe元素,具体可以包括:Based on this, the creation of a new iframe element for displaying the target page according to the access path information of the target page may specifically include:
在利用所述新增iframe元素展示从所述目标页面的访问路径信息处获取的页面信息的过程中,使用MutationObserver接口与ResizeObserver接口,确定所述页面信息的目标展示尺寸。In the process of using the newly added iframe element to display the page information obtained from the access path information of the target page, the MutationObserver interface and the ResizeObserver interface are used to determine the target display size of the page information.
将所述目标展示尺寸设置为所述新增iframe元素的展示尺寸。The target display size is set as the display size of the added iframe element.
本说明书实施例中,Mutation Observer接口(变动观察器)可以为用于监视DOM变动的API接口。在实际应用中,Mutation Observer接口具体可以用于监测节点的增减、属性的变动、文本内容的变动等。基于此,可以利用Mutation Observer接口去监视与目标页面对应的dom初始化加载过程,从而获取到目标页面中的页面信息的展示尺寸。In the embodiment of this specification, the Mutation Observer interface (change observer) may be an API interface for monitoring DOM changes. In practical applications, the Mutation Observer interface can be used to monitor the increase or decrease of nodes, changes of attributes, changes of text content, etc. Based on this, the Mutation Observer interface can be used to monitor the DOM initialization loading process corresponding to the target page, so as to obtain the display size of the page information in the target page.
Resize Observer接口可以在页面元素的大小发生变化时得到通知。基于此,也可以利用Resize Observer接口去获取目标页面中的页面信息的展示尺寸。The Resize Observer interface can be notified when the size of page elements changes. Based on this, you can also use the Resize Observer interface to obtain the display size of the page information in the target page.
在实际应用中,由于Mutation Observer接口通常无法监听到img加载完图片之后导致的展示尺寸的变化,而Resize Observer接口可以监听到img加载完图片之后导致的展示尺寸的变化,因此,可以同时结合Mutation Observer接口及Resize Observer接口去确定目标页面中的各个页面信息的展示尺寸,以及,将目标页面中的各个页面信息的展示尺寸之和确定为目标展示尺寸,以保障目标展示尺寸的准确性。后续,还可以通过设置iframe元素的展示尺寸为目标展示尺寸,从而令iframe元素与其展示的目标页面之间呈现良好的适配性,有利于提升用户体验。In practical applications, since the Mutation Observer interface usually cannot monitor the display size change after the img loads the image, the Resize Observer interface can monitor the display size change after the img loads the image. Therefore, it can be combined with Mutation at the same time. The Observer interface and the Resize Observer interface determine the display size of each page information in the target page, and determine the sum of the display sizes of each page information in the target page as the target display size, so as to ensure the accuracy of the target display size. Subsequently, the display size of the iframe element can also be set as the target display size, so that the iframe element and the target page displayed can show good adaptability, which is conducive to improving user experience.
在实际应用中,若当前的浏览器的滚动条位置偏下,当用户通过浏览器的前进或后退功能去展示目标页面时,由于iframe元素的初始展示尺寸偏小,因此,可能存在iframe元素未展示于浏览器窗口的可视区域的情况下,此时,Resize Observer接口通常只会在初始化dom时触发一次,使得Mutation Observer接口与Resize Observer接口均无法监听到img加载完图片之后导致的展示尺寸的变化。但是,相较于iframe元素的初始展示尺寸,通过将Mutation Observer接口及Resize Observer接口根据dom变化确定出的目标展示尺寸设置为iframe元素的展示尺寸,能够实现增大iframe元素的展示尺寸的功能,从而促使iframe元素展示于浏览器窗口的可视区域,进而使得Resize Observer接口恢复对于img加载完图片之后导致的展示尺寸的变化的监听功能,基于此,后续,还可以根据ResizeObserver接口监听到的展示尺寸的变化,重新去设置iframe元素的展示尺寸,以进一步保障iframe元素与其展示的目标页面之间可以呈现良好的适配性。即可以根据实际需求对iframe元素的展示尺寸进行多次变更及设置,以保证iframe元素与其展示的目标页面之间的适配性。In practical application, if the scroll bar position of the current browser is lower, when the user uses the forward or back function of the browser to display the target page, because the initial display size of the iframe element is too small, there may be cases where the iframe element does not In the case of displaying in the visible area of the browser window, at this time, the Resize Observer interface is usually only triggered once when the DOM is initialized, so that neither the Mutation Observer interface nor the Resize Observer interface can monitor the display size after the img loads the image The change. However, compared with the initial display size of the iframe element, by setting the target display size determined by the Mutation Observer interface and the Resize Observer interface according to the DOM change as the display size of the iframe element, the function of increasing the display size of the iframe element can be realized. In this way, the iframe element is displayed in the visible area of the browser window, and the Resize Observer interface restores the monitoring function for the display size change after the img loads the image. Based on this, the subsequent display can also be monitored according to the ResizeObserver interface If the size changes, re-set the display size of the iframe element to further ensure good adaptability between the iframe element and the target page it displays. That is, the display size of the iframe element can be changed and set multiple times according to actual needs, so as to ensure the adaptability between the iframe element and the target page displayed.
在实际应用中,若针对iframe元素设置的展示尺寸大于目标页面的目标展示尺寸,通常会导致用户无法滚动查阅目标页面,影响用户体验。In practical applications, if the display size set for the iframe element is larger than the target display size of the target page, it will usually cause the user to be unable to scroll to view the target page, affecting user experience.
基于此,将所述目标展示尺寸设置为新增iframe元素的展示尺寸之后,还可以包括:Based on this, after setting the target display size as the display size of the newly added iframe element, it may also include:
检测所述目标页面针对scrollTo函数的第三调用请求。Detecting the third calling request of the target page for the scrollTo function.
确定所述第三调用请求中携带的页面滚动参数。Determine the page scrolling parameter carried in the third call request.
利用所述网页按照所述页面滚动参数执行页面滚动操作。Using the webpage to perform a page scrolling operation according to the page scrolling parameter.
本说明书实施例中,scrollTo函数可以用于定位滚动条的位置。若用户对目标页面执行了页面滚动操作,则目标页面通常会根据用户的页面滚动操作去确定页面滚动参数,并将页面滚动参数作为调用scrollTo函数时的入参,以将页面滚动到指定位置。其中,页面滚动参数既可以用于反映从当前位置需要向何种方向滚动多少距离以到达目标位置,或者,也可用于反映目标位置的位置信息,对此不作具体限定。In the embodiment of this specification, the scrollTo function can be used to locate the position of the scroll bar. If the user performs a page scrolling operation on the target page, the target page usually determines the page scrolling parameters according to the user's page scrolling operation, and uses the page scrolling parameters as an input parameter when calling the scrollTo function to scroll the page to a specified position. Wherein, the page scrolling parameter can be used to reflect how much distance needs to be scrolled in which direction from the current position to reach the target position, or can also be used to reflect the position information of the target position, which is not specifically limited.
本说明书实施例中,为保障用户对于目标页面的滚动功能以及提升用户体验,可以取消iframe元素处的滚动条,并保留网页处的滚动条,当检测目标页面针对scrollTo函数的第三调用请求后,可以利用网页去调用scrollTo函数以控制网页的滚动条进行滚动,从而通过控制浏览器窗口的可视区域中的网页的滚动,以实现对iframe元素的展示区域的滚动,进而达到滚动iframe元素中的目标页面的视觉效果,以保障用户可以去滚动查阅目标页面,有利于提升用户体验。In the embodiment of this specification, in order to ensure the scrolling function of the user on the target page and improve the user experience, the scroll bar at the iframe element can be canceled and the scroll bar at the web page can be reserved. After detecting the third call request of the target page for the scrollTo function , you can use the webpage to call the scrollTo function to control the scroll bar of the webpage to scroll, so as to realize the scrolling of the display area of the iframe element by controlling the scrolling of the webpage in the visible area of the browser window, and then achieve the scrolling of the iframe element The visual effect of the target page to ensure that users can scroll to view the target page, which is conducive to improving user experience.
在实际应用中,当网页与目标页面存在跨域情况时,网页通常是无法获取到目标页面的dom以及window下的变量和方法的,从而影响图1中方法及其实施例中的方案的应用。In practical applications, when there is a cross-domain situation between the webpage and the target page, the webpage usually cannot obtain the variables and methods under the dom and window of the target page, thus affecting the application of the method in Figure 1 and the solution in the embodiment .
基于此,所述利用所述网页按照所述页面滚动参数执行页面滚动操作,具体可以包括:Based on this, the performing page scrolling operation according to the page scrolling parameters by using the webpage may specifically include:
利用postMessage函数发送所述页面滚动参数至所述网页。The page scrolling parameter is sent to the webpage by using the postMessage function.
利用所述网页生成携带有所述页面滚动参数的针对所述scrollTo函数的第四调用请求。Using the webpage to generate a fourth call request for the scrollTo function that carries the page scrolling parameter.
本说明书实施例中,PostMessage函数可以用于将消息放入(寄送)到与指定窗口创建的线程相对应的消息队列里,消息需求方则可以通过GetMessage和PeekMessage函数去获取该消息队列里的消息,从而可以用于解决跨域情况下的网页与目标页面之间的通信问题。在实际应用中,可以在目标页面应用postMessage函数,以将目标页面获取到的页面滚动参数写入消息队列,而网页则可以从消息队列里获取页面滚动参数,进而自行利用页面滚动参数去调用该网页处的scrollTo函数,以实现目标页面的滚动。In the embodiment of this specification, the PostMessage function can be used to put (send) the message into the message queue corresponding to the thread created by the specified window, and the message demander can use the GetMessage and PeekMessage functions to obtain the messages in the message queue. message, which can be used to solve the communication problem between the web page and the target page in the case of cross-domain. In practical applications, the postMessage function can be applied to the target page to write the page scrolling parameters obtained by the target page into the message queue, and the webpage can obtain the page scrolling parameters from the message queue, and then use the page scrolling parameters to call the The scrollTo function at the webpage to realize the scrolling of the target page.
除此之外,本说明书实施例中,网页所需获取的目标页面处的其他信息,诸如,针对目标页面对于pushState函数的第一调用请求的检测结果,针对目标页面的页面信息确定出的目标展示尺寸等,均可以由目标页面利用postMessage函数发送至网页,以保障图1中方法及其实施例中的方案的运行,对此不作赘述。In addition, in the embodiment of this specification, other information at the target page that the web page needs to obtain, such as the detection result of the first call request of the pushState function for the target page, the target page information determined for the target page Display size, etc., can be sent from the target page to the webpage by using the postMessage function to ensure the operation of the method in Figure 1 and the solutions in the embodiments, which will not be described in detail.
图3为本说明书实施例提供的对应于图1中的页面展示方法的泳道流程示意图。如图3所示,该页面展示流程可以涉及网页及iframe元素等执行主体。FIG. 3 is a schematic diagram of a swimming lane process corresponding to the page display method in FIG. 1 provided by the embodiment of this specification. As shown in FIG. 3 , the page display process may involve execution entities such as web pages and iframe elements.
在浏览器历史记录生成阶段,若用户需要展示网页处的iframe元素中的目标页面,则用户可以通过在终端设备处的网页中输入访问路径、点击网页中的链接等方式执行第一用户操作。终端设备响应于第一用户操作,可以在网页处的iframe元素中展示目标页面,以及,若检测到所述目标页面针对pushState函数的第一调用请求,可以拦截第一调用请求,并获取网页的统一资源定位符信息、所述目标页面相对于所述网页的相对路径信息以及所述目标页面的路径参数信息,对所述网页的统一资源定位符信息、所述相对路径信息及所述路径参数信息进行拼接,得到所述网页的修改后访问路径信息。终端设备还可以利用所述网页生成携带有修改后访问路径信息的针对pushState函数的第二调用请求,以根据所述网页的修改后访问路径信息,生成目标浏览器历史记录信息。In the browser history generation stage, if the user needs to display the target page in the iframe element at the webpage, the user can perform the first user operation by entering the access path in the webpage at the terminal device, clicking a link in the webpage, and the like. In response to the first user operation, the terminal device can display the target page in the iframe element on the web page, and if it detects the first call request of the target page for the pushState function, it can intercept the first call request and obtain the Uniform resource locator information, relative path information of the target page relative to the webpage, and path parameter information of the target page, for the uniform resource locator information of the webpage, the relative path information, and the path parameter information The information is spliced to obtain the modified access path information of the webpage. The terminal device may also use the web page to generate a second call request for the pushState function carrying the modified access path information, so as to generate target browser history information according to the modified access path information of the web page.
在目标页面展示阶段,若用户需要基于浏览器历史记录信息去再次展示目标页面,则可以在终端设备处执行用于触发网页中的浏览器前进控件、浏览器后退控件或浏览器刷新控件的第二用户操作。终端设备在检测到用于展示网页处的iframe元素中的目标页面的popState事件或者beforeunload事件后,可以根据目标浏览器历史记录信息,确定目标页面的访问路径信息,以及,判断所述网页处具有已创建的所述iframe元素。若所述网页处具有已创建的所述iframe元素,则销毁已创建的所述iframe元素,并根据所述目标页面的访问路径信息,创建用于展示所述目标页面的新增iframe元素,还有,在利用新增iframe元素展示目标页面的页面信息的过程中,使用MutationObserver接口与ResizeObserver接口,确定所述页面信息的目标展示尺寸,并将所述目标展示尺寸设置为所述新增iframe元素的展示尺寸,以保障目标页面的页面展示效果。In the stage of displaying the target page, if the user needs to display the target page again based on the browser history information, the first step for triggering the browser forward control, browser back control or browser refresh control in the web page can be executed at the terminal device. Two user operations. After the terminal device detects the popState event or the beforeunload event of the target page in the iframe element used to display the web page, it can determine the access path information of the target page according to the historical record information of the target browser, and determine that the web page has The iframe element has been created. If the webpage has the created iframe element, destroy the created iframe element, and create a new iframe element for displaying the target page according to the access path information of the target page, and Yes, in the process of using the new iframe element to display the page information of the target page, use the MutationObserver interface and the ResizeObserver interface to determine the target display size of the page information, and set the target display size to the new iframe element display size to ensure the page display effect of the target page.
后续,若终端设备检测到所述目标页面针对scrollTo函数的第三调用请求,还可以令所述目标页面利用postMessage函数发送所述页面滚动参数至所述网页,以及,利用所述网页生成携带有所述页面滚动参数的针对所述scrollTo函数的第四调用请求,从而实现滚动目标页面的视角效果。Subsequently, if the terminal device detects the third calling request of the target page for the scrollTo function, the target page can also be made to use the postMessage function to send the page scrolling parameters to the webpage, and use the webpage to generate The fourth call request for the scrollTo function of the page scrolling parameter, so as to realize the viewing angle effect of the scrolling target page.
基于同样的思路,本说明书实施例还提供了上述方法对应的装置。图4为本说明书实施例提供的对应于图1的一种页面展示装置的结构示意图。如图4所示,该装置可以包括:Based on the same idea, the embodiment of this specification also provides a device corresponding to the above method. FIG. 4 is a schematic structural diagram of a page display device corresponding to FIG. 1 provided by the embodiment of this specification. As shown in Figure 4, the device may include:
第一获取模块402,用于获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求。The first obtaining
访问路径确定模块404,用于响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息。The access
页面展示模块406,用于根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。The
基于图4的装置,本说明书实施例还提供了该装置的一些具体实施方案,下面进行说明。Based on the device in FIG. 4 , the embodiment of this specification also provides some specific implementations of the device, which will be described below.
可选的,图4中的装置,还可以包括:Optionally, the device in Figure 4 may also include:
第二获取模块,用于获取针对已展示的所述目标页面的浏览器历史记录生成请求。The second acquiring module is configured to acquire a browser history generation request for the displayed target page.
路径修改模块,用于响应于所述浏览器历史记录生成请求,根据所述目标页面的第二访问路径信息,对所述网页的第一访问路径信息进行修改,得到所述网页的修改后访问路径信息。A path modification module, configured to modify the first access path information of the web page according to the second access path information of the target page in response to the browser history record generation request, to obtain the modified access path of the web page path information.
历史记录生成模块,用于根据所述网页的修改后访问路径信息,生成所述目标浏览器历史记录信息。A historical record generating module, configured to generate the target browser historical record information according to the modified access path information of the webpage.
可选的,所述路径修改模块,可以包括:Optionally, the path modification module may include:
第一获取单元,用于获取所述网页的统一资源定位符信息。The first obtaining unit is configured to obtain the uniform resource locator information of the webpage.
第二获取单元,用于获取所述目标页面相对于所述网页的相对路径信息以及所述目标页面的路径参数信息。The second acquiring unit is configured to acquire relative path information of the target page relative to the web page and path parameter information of the target page.
拼接单元,用于对所述网页的统一资源定位符信息、所述相对路径信息及所述路径参数信息进行拼接,得到所述网页的修改后访问路径信息。The splicing unit is configured to splice the uniform resource locator information of the webpage, the relative path information and the path parameter information to obtain the modified access path information of the webpage.
可选的,所述第二获取模块,具体可以用于:检测所述目标页面针对pushState函数的第一调用请求。Optionally, the second obtaining module may specifically be configured to: detect the first calling request of the target page for the pushState function.
所述历史记录生成模块,具体可以用于:利用所述网页生成携带有所述修改后访问路径信息的针对所述pushState函数的第二调用请求;以及,响应于所述第二调用请求,根据所述修改后访问路径信息,生成所述目标浏览器历史记录信息。The history record generating module may be specifically configured to: use the webpage to generate a second call request for the pushState function carrying the modified access path information; and, in response to the second call request, according to The modified access path information generates the target browser history record information.
可选的,所述页面展示请求是所述用户通过针对浏览器前进控件、浏览器后退控件及浏览器刷新控件中的任意一种执行触发操作而生成的请求。Optionally, the page display request is a request generated by the user by performing a trigger operation on any one of the browser forward control, browser back control and browser refresh control.
可选的,所述第一获取模块402,具体可以用于:检测用于展示所述目标页面的popState事件;或者,检测用于展示所述目标页面的beforeunload事件。Optionally, the first obtaining
可选的,所述页面展示模块406,可以包括:Optionally, the
元素销毁单元,用于若所述网页处具有已创建的所述iframe元素,则销毁所述已创建的所述iframe元素。An element destroying unit, configured to destroy the created iframe element if the created iframe element exists on the web page.
元素创建单元,用于根据所述目标页面的访问路径信息,创建用于展示所述目标页面的新增iframe元素。The element creation unit is configured to create a newly added iframe element for displaying the target page according to the access path information of the target page.
可选的,所述页面展示模块406,具体可以用于:Optionally, the
在利用所述新增iframe元素展示从所述目标页面的访问路径信息处获取的页面信息的过程中,使用MutationObserver接口与ResizeObserver接口,确定所述页面信息的目标展示尺寸。In the process of using the newly added iframe element to display the page information obtained from the access path information of the target page, the MutationObserver interface and the ResizeObserver interface are used to determine the target display size of the page information.
将所述目标展示尺寸设置为所述新增iframe元素的展示尺寸。The target display size is set as the display size of the added iframe element.
可选的,图4中的装置,还可以包括:Optionally, the device in Figure 4 may also include:
检测模块,用于检测所述目标页面针对scrollTo函数的第三调用请求。A detection module, configured to detect the third calling request of the target page for the scrollTo function.
页面滚动参数确定模块,用于确定所述第三调用请求中携带的页面滚动参数。A page scrolling parameter determining module, configured to determine the page scrolling parameter carried in the third call request.
页面滚动操作执行模块,用于利用所述网页按照所述页面滚动参数执行页面滚动操作。A page scrolling operation executing module, configured to use the webpage to perform a page scrolling operation according to the page scrolling parameters.
可选的,所述页面滚动操作执行模块,具体可以用于:Optionally, the page scrolling operation execution module can specifically be used for:
利用postMessage函数发送所述页面滚动参数至所述网页。The page scrolling parameter is sent to the webpage by using the postMessage function.
利用所述网页生成携带有所述页面滚动参数的针对所述scrollTo函数的第四调用请求。Using the webpage to generate a fourth call request for the scrollTo function that carries the page scrolling parameter.
基于同样的思路,本说明书实施例还提供了上述方法对应的设备。Based on the same idea, the embodiment of this specification also provides a device corresponding to the above method.
图5为本说明书实施例提供的对应于图1的一种页面展示设备的结构示意图。如图5所示,设备500可以包括:FIG. 5 is a schematic structural diagram of a page display device corresponding to FIG. 1 provided by the embodiment of this specification. As shown in Figure 5,
至少一个处理器510;以及,at least one
与所述至少一个处理器通信连接的存储器530;其中,a
所述存储器530存储有可被所述至少一个处理器510执行的指令520,所述指令被所述至少一个处理器510执行,以使所述至少一个处理器510能够:The
获取用户针对网页处的iframe元素中展示过的目标页面的页面展示请求。Obtain the user's page display request for the target page displayed in the iframe element on the web page.
响应于所述页面展示请求,根据目标浏览器历史记录信息,确定所述目标页面的访问路径信息;其中,所述目标浏览器历史记录信息是在所述目标页面的历史展示过程中根据所述网页的修改后访问路径信息生成的,所述修改后访问路径信息用于反映所述网页的第一访问路径信息以及所述目标页面的第二访问路径信息。In response to the page display request, determine the access path information of the target page according to the historical record information of the target browser; wherein, the historical record information of the target browser is based on the historical display process of the target page according to the The modified access path information of the webpage is generated, and the modified access path information is used to reflect the first access path information of the web page and the second access path information of the target page.
根据所述目标页面的访问路径信息,在所述网页处的所述iframe元素中展示所述目标页面。According to the access path information of the target page, the target page is displayed in the iframe element on the web page.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于图5所示的设备而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device shown in FIG. 5 , since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiment.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable GateArray,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware DescriptionLanguage)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(RubyHardware Description Language)等,目前最普遍使用的是VHDL(Very-High-SpeedIntegrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, the improvement of a technology can be clearly distinguished as an improvement in hardware (for example, improvements in circuit structures such as diodes, transistors, and switches) or improvements in software (improvement in method flow). However, with the development of technology, the improvement of many current method flows can be regarded as the direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by hardware physical modules. For example, a programmable logic device (Programmable Logic Device, PLD) (such as a field programmable gate array (Field Programmable GateArray, FPGA)) is such an integrated circuit, the logic function of which is determined by the user's programming of the device. It is programmed by the designer to "integrate" a digital system on a PLD, instead of asking a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of making integrated circuit chips by hand, this kind of programming is mostly realized by "logic compiler (logic compiler)" software, which is similar to the software compiler used when program development and writing, but before compiling The original code of the computer must also be written in a specific programming language, which is called a hardware description language (Hardware Description Language, HDL), and there is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., currently the most commonly used is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that only a little logical programming of the method flow in the above-mentioned hardware description languages and programming into an integrated circuit can easily obtain a hardware circuit for realizing the logic method flow.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller may be implemented in any suitable way, for example the controller may take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (such as software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to realizing the controller in a purely computer-readable program code mode, it is entirely possible to make the controller use logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as structures within the hardware component. Or even, means for realizing various functions can be regarded as a structure within both a software module realizing a method and a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Combinations of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing the present application, the functions of each unit can be implemented in one or more pieces of software and/or hardware.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer-readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above descriptions are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims (21)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211543526.5A CN115952367A (en) | 2022-12-01 | 2022-12-01 | A page display method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211543526.5A CN115952367A (en) | 2022-12-01 | 2022-12-01 | A page display method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115952367A true CN115952367A (en) | 2023-04-11 |
Family
ID=87281568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211543526.5A Pending CN115952367A (en) | 2022-12-01 | 2022-12-01 | A page display method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115952367A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110055314A1 (en) * | 2009-09-02 | 2011-03-03 | Facebook Inc. | Page rendering for dynamic web pages |
CN104850602A (en) * | 2015-05-04 | 2015-08-19 | 微梦创科网络科技(中国)有限公司 | Method and apparatus for rendering and refreshing based on Internet webpage |
CN106201562A (en) * | 2015-04-30 | 2016-12-07 | 深圳市腾讯计算机系统有限公司 | A kind of page switching method and device |
CN106294648A (en) * | 2016-08-03 | 2017-01-04 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device for page access path |
CN110399189A (en) * | 2019-05-28 | 2019-11-01 | 西安交大捷普网络科技有限公司 | A kind of component separation dispatching method improving Ext frame operational efficiency |
CN113468450A (en) * | 2021-07-06 | 2021-10-01 | 北京有竹居网络技术有限公司 | Page control method and device |
US20220244820A1 (en) * | 2021-02-02 | 2022-08-04 | Taboola.Com Ltd | In-page navigation |
CN115221441A (en) * | 2022-07-27 | 2022-10-21 | 北京字跳网络技术有限公司 | Method and device for adjusting page display, electronic device and storage medium |
-
2022
- 2022-12-01 CN CN202211543526.5A patent/CN115952367A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110055314A1 (en) * | 2009-09-02 | 2011-03-03 | Facebook Inc. | Page rendering for dynamic web pages |
CN106201562A (en) * | 2015-04-30 | 2016-12-07 | 深圳市腾讯计算机系统有限公司 | A kind of page switching method and device |
CN104850602A (en) * | 2015-05-04 | 2015-08-19 | 微梦创科网络科技(中国)有限公司 | Method and apparatus for rendering and refreshing based on Internet webpage |
CN106294648A (en) * | 2016-08-03 | 2017-01-04 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device for page access path |
CN110399189A (en) * | 2019-05-28 | 2019-11-01 | 西安交大捷普网络科技有限公司 | A kind of component separation dispatching method improving Ext frame operational efficiency |
US20220244820A1 (en) * | 2021-02-02 | 2022-08-04 | Taboola.Com Ltd | In-page navigation |
CN113468450A (en) * | 2021-07-06 | 2021-10-01 | 北京有竹居网络技术有限公司 | Page control method and device |
CN115221441A (en) * | 2022-07-27 | 2022-10-21 | 北京字跳网络技术有限公司 | Method and device for adjusting page display, electronic device and storage medium |
Non-Patent Citations (1)
Title |
---|
"JS 创建iframe,移除iframe中所不需要的元素", pages 2, Retrieved from the Internet <URL:https://blog.csdn.net/sugerinaflat/article/details/124282761> * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2009217633B2 (en) | Editing a document using a transitory editing surface | |
US8645849B2 (en) | Method and apparatus for providing portioned web pages in a graphical user interface | |
US6978445B2 (en) | Method and system for supporting user navigation in a browser environment | |
US9756140B2 (en) | Tracking user behavior relative to a network page | |
US8881055B1 (en) | HTML pop-up control | |
US7877702B2 (en) | Tree widget data population | |
US8949858B2 (en) | Augmenting user interface elements with information | |
JP2012507089A (en) | Surface and manage window-specific controls | |
EP2742422A2 (en) | Content preview | |
WO2016110202A1 (en) | Method, client and device for displaying page | |
CN106294463B (en) | Data point updating method and equipment for dynamic curve | |
CN106155654B (en) | Method and device for shielding webpage operation and electronic equipment | |
US20130191778A1 (en) | Semantic Zooming in Regions of a User Interface | |
CN107391534B (en) | Page display method, page file return method, page display device, page file return device and computer storage medium | |
CN108664191B (en) | System access method and device | |
CN113672323A (en) | Page display method and device | |
CN110262749B (en) | Webpage operation method, device, container, equipment and medium | |
CN114741149A (en) | Page switching method and device for single-page application, storage medium and electronic equipment | |
CN109948091A (en) | Web page processing method and client device | |
CN119166919A (en) | Internet page positioning method, device and electronic device | |
CN115952367A (en) | A page display method, device and equipment | |
WO2018137470A1 (en) | User terminal and webpage image resource loading device and method, storage medium | |
CN110708270A (en) | Abnormal link detection method and device | |
US20240346102A1 (en) | Detachable browser interface for context-aware web services | |
US20180107556A1 (en) | Self-recovering application |
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 |