Weblog Tools Collection: How To Include CSS and JavaScript Conditionally
144 Views Published 1 month, 3 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?
Search
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
- Weblog Tools Collection: Plugin Review: Improved Plugin Installation - Wordpress
- Weblog Tools Collection: Bookmarklet to Quickly Access WordPress Admin Menu - Wordpress
Recent Entries
- vBulletin 3.8.5 Maintenance Release Now Available! - vBulletin AnnouncementsvBulletin.com
- Dev Blog: Firefox Personas, WordPress-style - Wordpress
- Weblog Tools Collection: WordPress Plugin Releases for 03/11 - Wordpress
- Matt: Bangkok Unrest - Wordpress
- vBa CMPS Security Alert! 3.2.2 & 4.0 RC1 Released - AnnouncementsvBadvanced
Popular Resources
- Phorum-5.2.8 final released (13 replies) - 29894 Views
- Phorum-5.2.9a released (10 replies) - 26652 Views
- IPB Resources - 10940 Views
- Weblog Tools Collection: WordPress Theme Releases for 01/14 - 9383 Views
- Weblog Tools Collection: WordPress Theme Releases for 01/10 - 8694 Views







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