Method for extracting webpage first screen CSS style

An extraction method and style technology, applied in the field of extracting CSS styles on the first screen of web pages, can solve problems such as few optimization schemes, and achieve the effects of performance optimization, performance improvement, and performance improvement.

Pending Publication Date: 2021-01-15
南京焦点领动云计算技术有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

And most of the optimizations are optimized for DOM and

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
  • Method for extracting webpage first screen CSS style

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0020]The present invention will be further described below in conjunction with the accompanying drawings and exemplary embodiments:

[0021]Such asfigure 1Shown is a method of extracting the CSS style of the first screen of a webpage, the specific steps are:

[0022]Step S1: Configure node server parameters, the node server is used to receive requests for extracting CSS styles; the node server configuration includes configuration: the number of interfaceless browsers that are started at the same time, the device width and the startup mode; The request includes the page access address for which the CSS style needs to be extracted.

[0023]Step S2: A request for extracting CSS styles is initiated through the client. After receiving the request from the client, the node server starts an interfaceless browser and starts the extraction task. The extraction task means: the node server receives the request from the client Then start a monitoring event, which is used to obtain the CSS with the high...

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 a method for extracting a webpage first screen CSS style, which is characterized by comprising the following steps: step 1, configuring a node server, step 2, initiating a request for extracting the CSS style through a client, starting an interface-free browser, starting an extraction task, and waiting for the interface-free browser to return a result; 3, configuring nodejsaccess parameters, and calling a collection method to obtain all CSS styles in the target page; 4, filtering all the CSS styles in the page obtained in the step 3 by using postcss; 5, analyzing the CSS style of the first screen; and 6, rendering the CSS style of the first screen again, carrying out performance optimization after the development main body is completed, wherein the performance canbe further improved; according to the method, the main CSS content is extracted, link and string labels are removed, http requests and doc content are reduced, and the effect of obviously improving the performance of web pages with more page content is achieved.

Description

technical field [0001] The invention relates to the field of service discovery of computer processing technology, in particular to a method for extracting the CSS style of the first screen of a webpage. Background technique [0002] In the computer field, the amount of web content is very important to developers, testers, users and service personnel. In modern browser systems, in order to avoid the problems of slow loading of web pages caused by too much DOC content, poor user experience, and user loss. Developers often pay attention to this aspect at the beginning of development, such as using the new HTML5 protocol, reducing the nesting level of tags as much as possible, and delaying the loading and execution of js as much as possible. These are some traditional methods to optimize web pages. [0003] Most of the methods traditionally used are to optimize web pages during the development stage, for example, execute js asynchronously to prevent blocking rendering; reduce ...

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
IPC IPC(8): G06F16/957G06F16/958
CPCG06F16/957G06F16/958
Inventor 刘家胡成钢
Owner 南京焦点领动云计算技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products