SEMANTIC COMPRESSION OF CASCADING STYLE SHEETS
First Claim
1. A method performed by a computing device for compressing a cascading style sheet to be used to render a markup page, the method comprising:
- parsing the cascading style sheet to identify style rules therein;
performing semantic analysis on the style rules to select one or more target style rules from among the identified style rules; and
outputting and storing a compressed version of the cascading style sheet by making a semantic modification to the cascading style sheet, wherein the semantic modification is either omitting a target style rule or modifying semantic content of a target style rule.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments relate to semantic compression of cascading style sheets. Starting with a markup page having markup elements and a reference to a cascading style sheet, based on the reference to the cascading style sheet, the cascading style sheet is retrieved. The cascading style sheet has a plurality of style rules. The cascading style sheet is applied to the markup page to identify one or more of the style rules to be modified or omitted (e.g., rules that are redundant with respect to the markup page or inapplicable to the markup page). A compressed cascading style sheet is generated by excluding the identified rules from the compressed cascading style sheet or modifying the identified rules. The compressed cascading style sheet can then be applied to the markup sheet with similar effect as the uncompressed cascading style sheet.
23 Citations
20 Claims
-
1. A method performed by a computing device for compressing a cascading style sheet to be used to render a markup page, the method comprising:
-
parsing the cascading style sheet to identify style rules therein; performing semantic analysis on the style rules to select one or more target style rules from among the identified style rules; and outputting and storing a compressed version of the cascading style sheet by making a semantic modification to the cascading style sheet, wherein the semantic modification is either omitting a target style rule or modifying semantic content of a target style rule. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. One or more computer-readable storage media storing information to enable a computing device to perform a process, the process comprising:
-
receiving a markup page comprising markup elements and a reference to a cascading style sheet; based on the reference to the cascading style sheet, retrieving the cascading style sheet, the cascading style sheet comprising a plurality of style rules, each style rule comprising a selector and one or more declarations, each declaration identifying a property and a value; applying the cascading style sheet to the markup page to identify one or more of the style rules as either redundant with respect to the markup page or inapplicable to the markup page; and generating a compressed cascading style sheet comprised of some of the style rules from the cascading style sheet, wherein a style rule identified as either redundant or inapplicable is not included in the compressed cascading style sheet. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A method performed by one or more computing devices, the method comprising:
-
using a markup page to select one or more target style rules in a cascading style sheet that is associated with the markup page for the purpose of a browser rendering the markup page; deleting the selected one or more target style rules from the cascading style sheet; and after the deleting, storing the cascading style sheet as a compressed cascading style sheet. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification