cssdrupaldrupal-6

drupal remove unused css


i'm using drupal 6 .Is there any way to remove unused css (eg. from system.css) from a page before loading. Unused css degrades my site's performance by increasing loading time.


Solution

  • You would spend more time parsing CSS than you would just loading the file to begin with. You would lose any benefit of the CSS being cached since each page would have a different resulting CSS file. You would be better off simply optimizing and compressing your CSS than trying to parse through it on every page load.