Info
- 9 posts
- 4 voices
- Started 4 years ago by HowToGeek
- Latest reply from HowToGeek
- This topic is not resolved
Is bb_enqueue_script really needed?
-
- Posted 4 years ago #
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 4 years ago #
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 4 years ago #
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 4 years ago #
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 4 years ago #
Is prototype even needed since we have/use jquery now? If so, let's dich prototype??
-
- Posted 4 years ago #
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 4 years ago #
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 4 years ago #
I think switching entirely is planned.
-
- Posted 4 years ago #
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.
-
You must log in to post.