Using both style and local css slowing load times

Events happening in the community are now at Drupal community events on www.drupal.org.
manogolf's picture

While viewing site load results from tools.pingdom.com I noticed the files in style.css were loading in addition to mods made in local.css. This is normal and expected however it does slow site load times. I my case it really had a great effect.

Building on the fabulous idea of a local.css file I also created a new directory for altered images and modified the paths in the local.css file. The idea was to have untouched slate images as a source and all my image tweaks as a separate source on the server in the same slate theme directory. Past theme update experiences wiped out customized images left in the images folder and forced the extra step of uploading images again. Not that big of a deal until you're faced with repeating the task across several domains on several servers. Yuck!

So I have approached this differently. Nothing groundbreaking, new, or sexy by any means. What I seek is anyone that wishes, shoot holes in the method and maybe suggest something better.

Copy, paste, the entire style.css file into local.css. Modify local as desired and save. For me that included paths to my custom images directory. If I were to stop here, as I did, the site loads are horrible because both sets of images are loading. Albeit images in local are overriding default images, however, as stated, both image directories are loading all images to the browser.

The final step was modify the .info file and comment style.css so only local.css is loading. Loading a single css file helps reduce load times. For me it cut out 3 seconds, but then the setup I created was a bit goofy.

After finding a sweet text editor (free, google notepad++) I can quickly handle updated style.css when a theme updates. Notepad ++ has a compare feature that will display style and local side by side and identify differences. A little copy/paste work and the local.css file reflects any new changes to style.css.

TNT Themes

Group organizers

Group categories

Type of post

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: