US 11,734,378 B2
Method and apparatus of pre-rendering page, electronic device, and storage medium
Ning Wang, Beijing (CN)
Assigned to Baidu Online Network Technology (Beijing) Co., Ltd., Beijing (CN)
Appl. No. 17/419,245
Filed by Baidu Online Network Technology (Beijing) Co., Ltd., Beijing (CN)
PCT Filed Nov. 30, 2020, PCT No. PCT/CN2020/132782
§ 371(c)(1), (2) Date Jun. 28, 2021,
PCT Pub. No. WO2021/174928, PCT Pub. Date Sep. 10, 2021.
Claims priority of application No. 202010136181.6 (CN), filed on Mar. 2, 2020.
Prior Publication US 2022/0308900 A1, Sep. 29, 2022
Int. Cl. G06F 16/957 (2019.01); G06F 16/958 (2019.01); G06F 9/451 (2018.01); G06F 9/445 (2018.01); G06F 9/455 (2018.01)
CPC G06F 16/9574 (2019.01) [G06F 9/451 (2018.02); G06F 16/957 (2019.01); G06F 16/986 (2019.01); G06F 9/44526 (2013.01); G06F 9/45529 (2013.01); G06F 16/958 (2019.01)] 5 Claims
OG exemplary drawing
 
1. A method of pre-rendering a page, comprising:
acquiring a static resource of a page to be processed;
acquiring a hypertext markup language structure information compiled of the page; and
generating a static hypertext markup language file of the page by using a native server-side rendering function of a web frame according to the static resource and the hypertext markup language structure information,
wherein the static resource contains Cascading Style Sheets and JavaScript scripts, and wherein the generating a static hypertext markup language file of the page by using a native server-side rendering function of a web frame comprises: executing the JavaScript scripts in an eval environment, simulating a required browser host environment by a JavaScript Document Object Model JSDOM, and generating the static hypertext markup language file of the page by using the native server-side rendering function of the web frame.