Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Active Publication Date: 2019-06-11
南京焦点领动云计算技术有限公司
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method of collecting and merging is actually just a simple string replacement, and the implementation is not flexible, and it is not convenient to perform secondary processing on these collected inline CSS / inline JavaScript according to business logic
[0006] Furthermore, not all inline CSS in an HTML page needs to be collected and processed uniformly. For example, some inline CSS needs to be sorted and processed after being collected and output to the page, and some inline CSS content needs to be replaced later, so the unified collection And the processing solution has poor personalization processing ability for single / multiple inline CSS, and it is inconvenient to expand

Method used

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
View more

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
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/20G06F8/38
CPCG06F8/24G06F8/38
Inventor 杨开森任睿
Owner 南京焦点领动云计算技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products