A method for combining html inline css and inline javascript

An HTML page and content technology, applied in the Internet field, can solve problems such as inflexibility, inconvenient expansion, inconvenient secondary processing, etc., to achieve the effects of guaranteed rendering effect, increased convenience, and fast rendering speed

An HTML page and content technology, applied in the Internet field, can solve problems such as inflexibility, inconvenient expansion, inconvenient secondary processing, etc., to achieve the effects of guaranteed rendering effect, increased convenience, and fast rendering speed

CN108762732BActive Publication Date: 2019-06-11南京焦点领动云计算技术有限公司

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for combining html inline css and inline javascript
  • A method for combining html inline css and inline javascript
  • A method for combining html inline css and inline javascript

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The present invention will be further described below in conjunction with accompanying drawing and exemplary embodiment:

[0039] figure 2 It is a schematic diagram of the original HTML content in the embodiment of the present invention, in which inline CSS tags Contains: body1{}, body2{}, body3{} and body4{}, inline JavaScript tags The contents included are: console.log("1"), console.log("2"), console.log("3"), console.log("4"), console.log("5"); In order to improve the rendering speed of the webpage, some inline CSS and inline JavaScript in the HTML content are merged. For specific steps, refer to figure 1 As shown, the specific process includes:

[0040] Step 201: randomly select a position in the HTML page, create a basic FreeMarker tag for wrapping inline CSS and inline JavaScript in the HTML page,

[0041] [@phoenix_directive_pm_HTML][ / @phoenix_directive_pm_HTML], according to the FreeMarker syntax, set the placeholders for collecting inline CSS...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an HTML inline CSS and inline JavaScript merging method. The method is characterized in that FreeMarker tags are self-defined, collection and summarization of inline CSS and inline JavaScript occupation points are set, original inline CSS and inline JavaScript tags are changed, and different analytical processing is performed according to the setting of whether two types oftag content are collected or not. The method has the advantages that collectable content and non-collectable content are distinguished more simply and flexibly, and the convenience of processing of the content in different forms in the page rendering process is enhanced; the inline CSS and inline JavaScript content capable of being collected and summarized is summarized and analyzed at set occupation positions, the inline CSS and inline JavaScript content incapable of being collected or summarized is analyzed at original positions, and therefore a high rendering speed can be guaranteed whilethe rendering effect is guaranteed.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a method for combining HTML inline CSS and inline JavaScript. Background technique [0002] FreeMarker is a template engine, that is, a general tool for generating output text (HTML web pages, emails, configuration files, source code, etc.) based on templates and data to be changed. This approach is often referred to as the MVC (Model View Controller) pattern, and it is an especially popular pattern for dynamic web pages, which helps to separate web designers (HTML designers) from developers (Java programmers). division). FreeMarker helps HTML designers no longer need to face complex logic in templates, and can modify the style of HTML pages even when no technical personnel participate in modifying or recompiling HTML codes. [0003] When a web page is rendered based on component modules, the HTML content of each component will have fragmented inline CSS associated with th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
11 Jun 2019
Publication
CN108762732B
IPC
G06F8/20; G06F8/38
CPC
G06F8/24; G06F8/38
Inventors
杨开森; 任睿