bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Is bb_enqueue_script really needed?

(9 posts)
  • Started 1 year ago by HowToGeek
  • Latest reply from HowToGeek
  • This topic is not resolved
  1. What exactly is this function in the header used for? I realize it outputs javascript, but I can't figure out what exactly the javascript is used for.

    I removed it.. everything seems to be working fine, but I'm confused what the point of it is?

    I've also noticed by looking at a trace of the MySQL logs that whatever the javascript is doing is hitting the server 3 times extra on every pageload, which is pulling a whole lot of extra sql queries.

    Posted 1 year ago #
  2. It adds the (half-dozen) ajax scripts to topic pages.
    Doesn't affect other pages from what I can see.
    In theory it's very necessary, can't delete topics without it since there is no non-ajax fallback from what I can see. Also things like adding/removing favorites within a topic.

    You can reduce mysql queries by pre-loading all options in one fetch at startup. Try this un-documented option in config.php
    $bb->load_options = true;

    personally I can't wait 'til they stop using prototype.js since it's HUGE for the few functions they access

    then there is add-load-event which is 200 or so bytes but not combined with any other script so it forces yet another external file load

    Posted 1 year ago #
  3. Adding / removing favorites works fine for me with the ajax disabled. Deleting topics works as well, it just doesn't prompt you before.

    Thanks for the heads-up on the option... I'll check that out.

    Posted 1 year ago #
  4. Interesting, you are right that it still works when removed, just refreshes the page instead of ajaxed.

    I get a white screen redirect when I delete or undelete a topic but that's probably my over-hacked template and something critical I removed... hmm...

    Posted 1 year ago #
  5. Is prototype even needed since we have/use jquery now? If so, let's dich prototype??

    Posted 1 year ago #
  6. jQuery is there but not everything uses jQuery yet. You could speed things along by rewriting the prototype code for jQuery if you like.

    Posted 1 year ago #
  7. Well eeuuhh, first I would have to know which part uses prototype and where that code is.

    And then I would have to learn to code properly :D

    Any1 know if it is even planned to switch interly to jQuery? It would save some useless script loading :) (and I would have to rewrite my bbMenu plugin, but I was planning to do that anyway)

    Posted 1 year ago #
  8. I think switching entirely is planned.

    Posted 1 year ago #
  9. So far I've had no issues with removing the javascript entirely... sure, administration functions aren't quite as pretty, but it's a lot less load on the server.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.