Weblog Tools Collection: How To Include CSS and JavaScript Conditionally
218 Views Published 7 months, 2 weeks ago in WordpressThis post written on the WeblogToolsCollection.com forums as a news submission has been well received by plugin developers that have taken notice. The article explains how to include CSS and JavaScript conditionally so that the code is not loaded on every page of the site.
If you think about it, there are many plugins that only do something once in a blue moon. Table of contents, text manipulators, galleries, sliders, etc, etc. If only they loaded their frontend code strictly when necessary, most page loads would suddenly become much lighter.
This technique if implemented by plugin authors sounds like it could have a significant impact on end users websites, especially when it comes to loading times. I’m always impressed with the speed of WordPress when I install a fresh copy without any plugins. WordPress loads very quickly both on the front and back ends. However, once I activate 30 or so plugins, most of which add functionality to the front end of the site, I see the page loads increase significantly. It’s a shame too since I routinely hear people claim WordPress is sluggish software only to find out they have over 30 plugins activated on their site.
If you’re a plugin author, can you please tell me what some of the drawbacks are with Artems approach?
Tags: plugin, WordpressSearch
About This Entry
- You’re currently reading “Weblog Tools Collection: How To Include CSS and JavaScript Conditionally,” an entry on The Staff Lounge
- Published at 1.15.10 / 7pm
Related Entries
- Weblog Tools Collection: Preventing WordPress Plugins From Loading - Wordpress
- Andrew: Troubleshooting TinyMCE in WordPress 2.7 - Wordpress
- Weblog Tools Collection: Fake WordPress Site - Wordpress
- Slow Forum and Gateway Timeouts - YaBBYaBB Chat and Support Community/YaBB News and Announcem
- Weblog Tools Collection: Plugin Review: Improved Plugin Installation - Wordpress
Recent Entries
- Matt: Upcoming WordCamps - Wordpress
- Dougal Campbell: WordPress Care Package - Wordpress
- Weblog Tools Collection: WordPress Plugin Releases for 09/01 - Wordpress
- WordPress Podcast: Listen to Liz Strauss: “Treat Your Blog Like a Business!” - Wordpress
- Lorelle on WP: Mind Blowing WordPress Plugins - Wordpress
Popular Resources
- Phorum-5.2.8 final released (12 replies) - 46674 Views
- Phorum-5.2.9a released (10 replies) - 35709 Views
- IPB Resources - 21800 Views
- Weblog Tools Collection: WordPress Plugin Releases for 02/07 - 17672 Views
- Phorum-5.2.9 released! Security Upgrade! (no replies) - 13813 Views







No Responses to “Weblog Tools Collection: How To Include CSS and JavaScript Conditionally”
Please Wait
Leave a Reply