MyBB Community Forums

Full Version: Removing jQuery and going back to Prototype/Scriptaculous
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I made the mistake of adding fancy things to my board using jQuery. Now I have to take it all off....

We HAVE to load prototype for MYBB to work (or recode it all) and so it is better to use Prototype and Scriptaculous solution where you can. I have my js gZipped and I am looking at a good js loader to load all the small scripts, and I am loading my scripts from google cdn hoping to hit a preloaded cache. It's all good stuff, and jquery is not that big but I am adding ANOTHER library of javascript to my page for eye-candy.

So I am looking for prototype solutions to the jQuery "fancy bits" I have on my site.

I am using prototype-overlay for my login/memberbox/popup quick reply and I just found a great tabs script that should do the job for the index page but I am struggling to implement a prototype solution for Joshee's sliding panel.

http://community.mybb.com/thread-73062.html

Tabs on jsfiddle >> http://jsfiddle.net/leefish/yYmKx/


70 kb of javascript for a panel. Plus two js files to load. I love the panel, but its gotta go.

Have any other MYBB users found any neat proto/scripty stuff that I can use instead of jQuery?
It is possible to use both and many do...

But, http://scripteka.com/ should help out if you want prototype only.
Yea, I found that one, VERY handy. I am currently using both - my point was more that its maybe not so smart to use both given the extra kbs. In theory you could say that the users will arrive with a primed cache, but I was reading on the Yahoo labs website and over 60% of users arrive at a site with an empty cache. So on that crucial first page load its SLOW.
Use the google hosted jquery. And, honestly I think we treat the web to much like speeds in the 90s still. I mean honestly a page may load faster with loading multiple javascript files since browsers support more than one connection (meaning you download them all at the same time anyway).

While yes in theory it should help there have been many other advances that make a lot of the small things mute with modern computers and broadband internet.
(2011-08-02, 07:15 PM)Alex Smith Wrote: [ -> ]Use the google hosted jquery. And, honestly I think we treat the web to much like speeds in the 90s still. I mean honestly a page may load faster with loading multiple javascript files since browsers support more than one connection (meaning you download them all at the same time anyway).

While yes in theory it should help there have been many other advances that make a lot of the small things mute with modern computers and broadband internet.

the browser may be able to handle the 10 simultaneous requests for files, but if all the files are coming from the same server (like 1 html, 3 CSS files, 4 JS files, 14 images, etc) the webserver itself has to process 22 files, but for a large number of users that may be requesting the data at the same or very close times.

For a shared host that is an issue. For VPS not so bad, but it depends on the server config. Dedicated, not much of an issue unless massive traffic or poor config.
(2011-08-02, 07:15 PM)Alex Smith Wrote: [ -> ]Use the google hosted jquery. And, honestly I think we treat the web to much like speeds in the 90s still. I mean honestly a page may load faster with loading multiple javascript files since browsers support more than one connection (meaning you download them all at the same time anyway).

While yes in theory it should help there have been many other advances that make a lot of the small things mute with modern computers and broadband internet.

I am using the google hosted jQuery.min and the google hosted prototype. I have a page load time of 4.5 seconds at the moment (from pingdom tools). I think I can get that lower. 4.5 seconds is slow. I am on a VPS, so I am better off than a shared host I guess.

I have removed a lot of the images (buttons etc) as I have an image intensive site in other respects, but its the javascript that is killing me. I am looking at things like require.js to see if I can group all those little files together. I have a lot of static files and they are all getting cookiefied, so I need to work on that too.

I have moved the stylesheets to the top so the page looks responsive but now there is some mystery js I can't find called highlight.js (and its accompanying css). If thats the yellow colors on the search I can live without that, I would like to remove it if possible.

Anyway, I will continue to look for Proto/Scripto alternatives to jQuery. Thanks for the input so far.
You can combine them into one file just have to update any references to match the one file. And, I'm pretty sure the highlight.js is for the search highlighting as you mentioned Wink.

Also make sure you have caching and everything set up correctly on the server end.
Yesterday, I managed to do a task on my to-do list that's been there since last year: MyBB powered by jQuery.

Before you ask, it's a maybe. :p
Say whaaaaat?? :o
That would be awesome Tomm - jQuery is so much easier to use than prototype (and its half the size) so that would totally solve all my problems....are you saying MAYBE mybb JQuery powered in the 1.6 series?

@Alex Smith -

Quote:You can combine them into one file just have to update any references to match the one file.

If I could only work out how to DO that Sad

Re caching - I use mem_cache for my queries wherever possible to stop hitting the DB - I also keep getting these messages (in page speed) about setting expiry headers. I am not sure how to do that either. Yea, I'm a noob.
Pages: 1 2