Any idea if XVE defers JS loading to the footer? I’m sifting through my plugins to squeeze as much site loading performance as I can and substituting plugins with “fast browsing” versions.
By the way, some commentary on the plugin: this is really a great plugin to simplify media embeds. Thanks, SaltwaterC! For veteran WP admins: this is the completely reworked and refactored successor to ye olde XHTML Video Embed plugin. It is especially helpful that all various embedded video formats have been simplified with a unified pair of
[video]tags, instead of having to remember all different format tags, like
[swf]etc. and it’s very nimble on its feet. I love its simplicity and reliability. If I may make a suggestion I’d ask for a simple button in the post/page editor to insert the tags, for those of us who forget where to find what (cough)
All the JS in use by the admin UI is loaded inline since it’s the only place where XVE actually uses client scripting. The script is loaded for the XVE UI only, without cluttering the interface, or interfering with other scripts. It also spared me the pain of figuring out how to make it play nice with HTTPS (when available).
Unfortunately my DOM-fu is not strong. Most of my JS experience is limited to the server side where I don’t have to deal with the browser landscape SNAFU. If you have ideas about how to make the inline code load faster (or to be deferred), I would gladly implement them. The code is loaded at the top of dashboard.php view, but I guess loading it at the bottom would yield minimal benefits in this case. The actual implementation is available here:
As you can see there’s an auto generated inline script that patches in the localization and the get_option(‘home’) call plus an inline script that adds the radio button listeners. Which I think that could be merged into the xve.js.php view :).
PS: actually the [swf] and [flv] tags are still there. Can’t include that with ease into the [video] tag since the video tag uses domain detection in order to know which URL rewrite to apply for the embedding. Making the domain exception to act either as [swf] or [flv] is possible, but with minimal benefits. And one would still to indicate the type for the non-default (which may be swf or flv).
Oh but I didn’t refer to the /wp-admin/ part, I was referring to the front end. And from testing I found XVE is indeed nice and nimble on its feet. You’re right: HTTPS is a pain the behind to get working right on the back end, with so many plugins not built with management over “strict” (clean) HTTPS connections in mind…
Thanks again for bringing XVE up to date, it’s a great plugin and I value it a lot for its simplicity and performance.
- The topic ‘[Plugin: XVE Various Embed] Does it defer JS loading, i.e. to the footer?’ is closed to new replies.