The invention discloses an
HTML (
Hypertext Markup Language) code rendering method and device of a
Web page and a
computer program product.The method comprises the following steps: firstly, acquiring a Vue component of a target
Web page, and then compiling the Vue component into an
HTML file, a CSS (Cascading
Style Sheet) file and a
JavaScript file; then, a preset code is injected into the
HTML file to generate a DSL code; then, a CSS file and a
JavaScript file can be used for converting the DSL code into a GoTemplate file, and then, the DSL code is converted into the GoTemplate file; secondly, compiling the dynamic object into a binary file, and obtaining real-
time data of the dynamic object in the binary file; finally, then HTML rendered text may be generated based on the real-
time data and the binary file; therefore, rendering of a traditional Node.js
server side is converted into
server side rendering of the Go language, so that a Go program is directly operated in a binary file after being compiled; on the basis of the method, the execution speed of code rendering can be increased without additionally deploying a running environment and carrying out code interpretation, so that the loading response speed of the
Web page is increased.