Loading all pages with AJAX
Permalink
What I would really like to see in the c5 core is the ability to switch c5 into a mode where it loaded all pages with AJAX. I.e. when clicking a link which leads to a page of the same page type, instead of loading the new page in its entirety the areas were loaded in AJAX and inserted.
I doubt this would significantly improve performance however it would improve user experience especially on slower and mobile browsers.
However, the real reason I would find it so beneficial is to be able to run continuous JavaScript in the background. For instance I have built this websitehttp://www.colchesterjazzclub.co.uk... - which has background music implemented using HTML5 Audio (3 separate tracks triggered using the header images), however the whole thing resets every time the user changes pages, which makes it largely pointless.
All solutions to this problem involve rewriting large parts of the CMS, and it is not good to see a CMS that prides itself on not limiting the designers imagination to fall short on a point like this which I'm sure will become more poignant over time.
I doubt this would significantly improve performance however it would improve user experience especially on slower and mobile browsers.
However, the real reason I would find it so beneficial is to be able to run continuous JavaScript in the background. For instance I have built this websitehttp://www.colchesterjazzclub.co.uk... - which has background music implemented using HTML5 Audio (3 separate tracks triggered using the header images), however the whole thing resets every time the user changes pages, which makes it largely pointless.
All solutions to this problem involve rewriting large parts of the CMS, and it is not good to see a CMS that prides itself on not limiting the designers imagination to fall short on a point like this which I'm sure will become more poignant over time.
Thanks, I thought of the popup solution but my site gives the user three choices of music which interact with graphic objects, so there would have to be some kind of communication with the popup window, which I believe is impossible in most browsers.
The add-on looks good but I don't have budget for that, especially when I can't make sure it works with my site!
The add-on looks good but I don't have budget for that, especially when I can't make sure it works with my site!
You could setup a cookie and in the player window set a timer that checks e.g. every second whether that cookie is changed...
Yes, that's a bit "hacky" but would give you a workaround for the problem.
But, some kind of ajax framework would probably work better in your case, whether it is self-written or one of the suggested ones.
-Antti
Yes, that's a bit "hacky" but would give you a workaround for the problem.
But, some kind of ajax framework would probably work better in your case, whether it is self-written or one of the suggested ones.
-Antti
That probably would have been an easier solution with hindsight. Ajax is messy, there are asynchronous loads going on all over the shop! Lightboxes and google maps have taken a lot of messing about to get to work.
This has to be done in the theme, attempting to do this in the core would not work, as it is impossible to detect content areas and such.
Thanks, that's useful, however c5 loads my block view.css and view.js files in the header, which is then not imported by the AJAXifier. I am trying to modify this code to do so, but I feel like I'm opening Pandora's box...
This can be achieved e.g. with this add-on:
http://www.concrete5.org/marketplace/addons/rapid-ajax-paging/...
Or, by writing a few lines of code and your own tool that will pass the correct area's content dynamically to the javascript.
I did like a year ago a similar music site project and the music player request came late in that project. I didn't want to write a lot again, so I by-passed the issue by letting the users open a small popup-window for the music player so that the music keeps on playing when they change pages. If you're interested seeing that in action, just throw me with a PM.
- Antti