Patent attributes
A style compressor for improving compression of a web document collects all the style attributes referenced by elements of the web document into a central style repository. The style compressor replaces each reference by each of the elements with a class attribute assigned in the central style repository to the replaced style attributes. Next, the style compressor organizes the style attributes in the central style repository and compresses the style attributes into a minimized selection of class attributes each referencing at least one of the style attributes. The style compressor updates the elements of the web document to reference one or more of the minimized selection of class attributes in the central style repository to produce a shorter, more efficiently organized web document.