Author Topic: optimization: don't load player.js and harness code if no player is config'd  (Read 3705 times)

diablodale

  • Full Member
  • **
  • Posts: 14
Hi. I have a friendly suggestion.

In doing some network analysis, I noticed that player.js is being loaded when (I think) its unneeded. On my site I do not use the default flow player. Instead, I use wp audio player 2.0. Therefore, there is some code that the Blubrry WP plugin is writing out and then causing player.js to load that isn't needed.

It seems to be in powerpress.php in powerpress_header(). If there was a check there to see if the admin has configured Powerpress to not render the player, then the code could skip writing out all the SCRIPT and STYLE code and therefore prevent loading the 30k player.js file.

Food for thought.

angelo

  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
I thought we were not including the js file in that scenario but now I'm looking at the source code and we're not. This will be an easy fix and will be included in the next update v0.7.2.

Thanks,
Angelo