Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.2k views
in Q2A Core by
Youtube loads it pages dynamically with AJAX, while showing their own (red) loading bar at the top. Is it possible to make Q2A do the same thing for its pages, to load content faster and to improve the user experience?

I've never written a website that loads its content dynamically, so I'm not sure how I'd tackle this myself.
Q2A version: 1.6.3

2 Answers

+3 votes
by
selected by
 
Best answer
This wouldn't really be possible with Q2A, due to its extensive cusomisation. For example the menus or widgets or header or any element might be different on different pages.

So the only way this could work would be to load the entire page with AJAX and replace the current page. But then you are doing exactly what a web browser does but via JavaScript so it would be notably slower.
by
There is a complicated manner that could be done with heavy works. In Yii framework there is some widgets that are ajax loaded pieces of web site. This technique could be used here in Q2A. but you are right, that would change Q2A core.
by
If there were only widgets then yes it could be possible. But *any* part of Q2A can be customized, and any page request could do any number of things server-side.
+2 votes
by

There is already a nice plugin that works for you. Get it from addons page

by
Thanks dude, that plugin's just for the question lists though, not for the actual pages.
by
What do you mean by actual pages? Most used page in Q2A are question lists and question page. Do you mean question page itself?
by
Well there are all the custom pages, user pages, feedback page, ... etcetera. Scott's answer makes sense though, thanks for the help.
...