WordPress.org

Ready to get started?Download WordPress

Forums

Compact WP Audio Player
[resolved] Loads scripts and css on all posts, not only on the ones having audio (4 posts)

  1. conualfy
    Member
    Posted 9 months ago #

    I find something quite bad for a plugin: it loads the plugin CSS and JS files on all posts. It should only load on the ones having the shortcode. It makes all sites a little slower because of this, and for Google it is important to have a fast loading website.

    http://wordpress.org/plugins/compact-wp-audio-player/

  2. mra13
    Member
    Plugin Author

    Posted 9 months ago #

    It enqueues the javascript and CSS files using the proper wordpress enque functions so I am not entirely sure what you are talking about. Read this for more explanation:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    This plugin needs javascript files and it includes them using the above mentioned function. If you don't want javascript then you will have to look for an alternative plugin that doesn't use javascript.

  3. conualfy
    Member
    Posted 9 months ago #

    You are talking about something else. What I said is that the scripts are loaded on all pages/posts, not only on the ones including sounds. I have 3 posts with sounds, but this plugin filters and includes the scripts in all posts (1000 posts). It makes websites slower than it should. Sorry if I was not very clear in the first post.

  4. wp-novis
    Member
    Posted 3 months ago #

    I noticed this thread was "resolved". Conualfy, were you able to use the wp enqueue script to have it only load on the page(s)/post(s) needed?

    I'm having the same issue.

Reply

You must log in to post.

About this Plugin

About this Topic