MyBB Community Forums

Full Version: Combine "prototype.js "with "general.js"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to combine
general.js prototype.js popup_menu.js
into one file?
Sure. Just combine the files and edit the headerinclude template to link to the new combined file.
Does I need to specify version name with it?
as in genral.js?ver=234 (e.g)
or just name my new file as
global.js and link it in header include?
You don't need to add a version, but honestly I see little need for doing this, it's one more thing you'll have to remember to do when you upgrade, and your browser will cache the javascript anyway so it's not going to be downloaded every page load.
Any side effect of caching javascript? as mybb default scripts are not cached
No, there are no side effects. Much the opposite actually.

And yes they are. JavaScript, CSS, images, etc. are all cached by the browser.
Thanks solved
(2011-09-02, 08:13 PM)sunjava1 Wrote: [ -> ]Any side effect of caching javascript? as mybb default scripts are not cached

They are, your browser caches the javascript and CSS and usually images on every site you visit so they load faster next time.