Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
757 views
in Q2A Core by
In all versions up to v.1.6.2 we have four javascript files:

qa-page.js

qa-question.js

qa-ask.js

qa-admin.js

Why do we not merge all into one? It would save us 3 requests.

 

PS: Furthermore I still like the javascript replaced by jquery code, esp. because of readability!
Q2A version: 1.6.2
by
I think we should at least merge page.js and question.js as most of the visitors will arrive on a question page, where both files get loaded.
by
Just merged question.js into page.js and minified it. Gives only 5KB more for page.js (!)

1 Answer

+1 vote
by
Do You know how to merge them ? I am as well interested !
by
Well, I checked all given js functions, they have all unique names. In other words: Just copy all code into one file and load only this one.
by
That sounds really great, I will give it a try later today. I think I have to modify the head_script() function as well to load only the new file...
Thank You so far
by
yes, edit file qa-page-question.php and comment out around line 183:
// $qa_content['script_rel'][]='qa-content/qa-question.js?'.QA_VERSION;

PS: I am actually more concerned now (regarding bandwith) with ckeditor: http://www.question2answer.org/qa/27667/ckeditor-gets-loaded-nearly-each-page-117kb-even-needed-speed
...