CSS UDJO Optimization: Is It Still Effective Today?
Exploring the 18-year-old UDJO (Using Declarations Just Once) technique for deduplicating CSS, reducing file sizes, and boosting performance.

Stock photo for illustration only, not from the actual event
- The UDJO (Using Declarations Just Once) technique reduces redundant CSS declarations based on the DRY principle.
- Manual deduplication is tedious, prompting the creation of automated tools like CSS Dedup.
- Testing across 20 websites confirms that UDJO still effectively cuts file size and improves web performance.
- It pairs exceptionally well with minification and compression for optimal results.
CSS optimization is often deceptively tricky. While we have plenty of tooling for minification, assuming we have fully exploited every avenue of CSS optimization is naive for a language that evolves almost daily. This reality prompts a fresh look at an 18-year-old technique known as UDJO, or "using declarations just once."
The technique draws inspiration from the DRY principle—"don’t repeat yourself"—by identifying and minimizing declaration repetition. For instance, if a declaration like display: flex appears multiple times, it gets reconciled into a single rule. While previous discussions covered "DRY CSS" mechanics, the real question is whether UDJO remains relevant and effective today.

Stock photo for illustration only, not from the actual event
UDJO remains crucial for modern web development because bloated style sheets severely impact load times. Deduplicating redundant declarations not only trims transfer size but also drastically improves code maintainability over time, especially when integrated into modern build pipelines and automated tooling.
A major roadblock to adopting UDJO has been the sheer volume of manual labor required for complex sites. To solve this, automated tooling was built to catch repetition safely. CSS Dedup was created not just to identify duplicates, but to handle deduplication while respecting selector locations and the CSS cascade.
18Years of UDJO history20Websites analyzed in initial test batch
To test modern effectiveness, an initial batch of 20 websites was arbitrarily selected and analyzed using CSS Dedup. The experiment measured potential file size reductions from safe deduplication. The data clearly shows that UDJO works well enough to achieve tangible file size savings, though effectiveness ultimately depends on repetition types and selector lengths.
For anyone interested in CSS optimization, maintainability, and performance, UDJO deserves a place in the overall developer workflow. Recent tests on static sites using CSS Dedup with specific configuration parameters demonstrate that already-minified style sheets can be made even smaller at virtually no cost. As tooling matures, it is clear we have not reached the ceiling of CSS optimization.
Source: CSS-Tricks
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment