Skip to main content
Topic: Loading a page or a page loading, whatever (Read 1571 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Loading a page or a page loading, whatever

Ok it is about page loading and I have been long wondering. Do we really need to load the whole page all the time? Or let me word that, can't we simply load the middle part, like in this <div id="wrapper" class="wrapper"> only?

*ahrasis is wondering whether this make any sense?"

Re: Loading a page or a page loading, whatever

Reply #1

Yep, I guess I got it.

That is a possible approach, for sure!
It has a "little" drawback (at least from my point of view, others may disagree): it's very javascript-oriented.
While I'm not against javascript, I would prefer to have pages at least present something with javascript disabled, and that would mean have a double system: one for when js is enable, one for when js is disabled.
Actually, it shouldn't be that difficult have it already with a rather simple approach: on the ajax requests, strip the html and body ayers and return only the remaining stuff. It may be tricky on certain actions because different javascript is served depending on the page, but something solvable I guess.

To say the truth, when I started this (that incidentally, it's at the very same status, no progresses so far LOL), what I had in mind, was 1st provide JSON responses for most if not all the actions, 2nd create an AngularJS-based theme, where using the API, the content was generated via javascript alone.
Bugs creator.
Features destroyer.
Template killer.

Re: Loading a page or a page loading, whatever

Reply #2

Ok. Nice. At least somebody thought of it and test it already.

I was having slow loading of pages today may be due to using Sub Forums Addon. And this idea pop up again. I have seen few codes that suggest using this approach but I do not to really starts and implement this. For instance, in the idea of having scrolling down and up feature for recent posts, messages, and pms.

It is like the one you suggested the other day for infinite / endless scrolling but both up and down side and for more pages. If many items need be refresh, then scrolling up and down list(s) might be using less queries. LOL.

I don't even know what I am saying and whether this is useful or makes sense but it could make a difference.

 

Re: Loading a page or a page loading, whatever

Reply #3

Less queries I don't know (queries are usually linked to the generation of data, not to the generation of the page itself, and since we need data, we have to query the database), it would indeed result in faster client-side page load, for example, using angularyjs, the "structural" elements of the page are already in place and styled, what is replaced is the content. That cuts down the time the browser need "build" the page.
Bugs creator.
Features destroyer.
Template killer.