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

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 JS, and there is rarely an optimization solution for CSS

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

Embodiment Construction

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

[0021] Such as figure 1 A method for extracting the CSS style of the first screen of a webpage is shown, and the specific steps are as follows:

[0022] Step S1: configure node server parameters, the node server is used to receive requests to extract CSS styles; the configuration node server includes configuration: the number of simultaneously started interfaceless browsers, device width and height, and startup modes; The request includes a page access address that needs to extract CSS styles.

[0023] Step S2: The client initiates a request to extract the CSS style. After receiving the request from the client, the node server starts the interfaceless browser and starts the extraction task. The extraction task refers to: the node server receives the request from the client Then start a monitoring event, the monitoring event is used to obtain the C...

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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products