Follow-up To Loading CSS And JS Conditionally
First of all, I'd like to thank everyone who read and gave their 2 cents about the [Wordpress Plugin Development] How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts post. The article was well received and will hopefully spark some optimizations around loading styles and scripts.
Here are some discussions and mentions around the web:
- an article on Weblog Tools Collection
- a forum post on WP Tavern
- twitter retweets
Sure, there are drawbacks to this method and it does require some more processing on the backend and it's not for everyone, which is why we should always strive for an even better solution.
I stand by my point of view that, for instance, my dedicated …
Updated: August 30th, 2014
Introduction
In this tutorial, I am going to introduce a WordPress technique that I believe was unpublished until I raised the question a few days ago on the WordPress forums.
In short, the problem I was trying to solve was plugins unnecessarily loading their JavaScript and CSS on *every* page of the blog, even when doing so would achieve absolutely nothing and the plugin wouldn't do any work.
I briefly mentioned this approach here but Scribu decided to expand on …