WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Bad Behavior] javascript in the footer, is it the same ? (6 posts)

  1. Marcomail
    Member
    Posted 4 years ago #

    i'm using a plugin to move javascript to footer, but i don't know if bad behavior works or not.

    http://wordpress.org/extend/plugins/bad-behavior/

  2. nv1962
    Member
    Posted 4 years ago #

    You can easily tell whether Bad Behavior works by looking at the source code of your page: if it does, you'll see a comment near the bottom.

    Moving JS to the footer (e.g. by using Vladimir Prelovac's solution to do that) often creates problems with plugins that don't like to be moved from where the author puts them; it's not a Bad Behavior issue.

  3. nv1962
    Member
    Posted 4 years ago #

    Ahem - this is what happens when you type faster than your eyes can check what you actually type: I was thinking about caching when I said "you'll see a comment near the bottom" - oops!

    Bad Behavior does of course show up, but it's higher up in the source code; you just have to search for the string "Bad Behavior" which would show, for the current version, something like this:

    <!-- Bad Behavior 2.0.28 run time: XX.XXX ms -->

    And then, of course, some Bad Behavior magic follows that bit. Bottom line, see the source code of your site to check whether BB is active.

  4. trusktr
    Member
    Posted 4 years ago #

    We need a plugin that will put only the scripts you choose (with check boxes) at the footer. As you said, putting all scripts down there could cause problems...

    I can't find one single plugin to do this!

  5. nv1962
    Member
    Posted 4 years ago #

    Many roads lead to Rome; as one possible alternative, you could take a look at WP Minify. It's a very nifty WP port of the minify project, which allows you to selectively (!) collect, unify and minify your CSS and/or JS files.

    You'll have to do the fishing expedition and bughunting yourself though - mainly because not all plugins are equally well-written, so not all CSS and JS scripts can be unified.

    Having said that: it's an issue that falls completely outside the scope of Bad Behavior, which is designed to keep the riff-raff out and thus reduce unnecessary server load - not to optimize server output.

  6. Kristina
    Member
    Posted 4 years ago #

    @TruSktr try W3 Total Cache - it will enable you to do that. :)

Topic Closed

This topic has been closed to new replies.

About this Topic