Slow Loading Observation Pages due to AJAX

i wanted to revisit this to address a couple of things.

first, i’ve been paying attention to the lazy loading of the bottom of the page, and one thing that i notice is that the page seems to only start rendering the bottom of the page once you scroll past a certain point on the page and stop scrolling. in other words, if you scroll very slowly past the point and then continue to scroll very slowly another 5 seconds before you stop scrolling, then the bottom of the page won’t start rendering until at least 5 seconds after you scroll past the point (after you stop scrolling).

so (@tiwane) i wonder if this could be tightened up so that the page starts rendering its bottom half as soon as you scroll past the point instead of waiting for scrolling to stop? i think that will help make the page seem more responsive. (this might be related / relevant to https://forum.inaturalist.org/t/something-going-on-with-the-website/20270. )

second, i failed to earlier address cazort’s complaint that the page is using AJAX at all – unrelated to the lazy loading of the bottom of the page (which is not really AJAX, AJ at best). this is just the way modular API programming works. the same API used by the web to deliver data is also being used for the Android and iOS apps. so if you want to take advantage of that modularity, you’re going to use some basic AJAX when coding the web page. there’s little reason to deviate from this, just to have your browser tab show a loading indicator until all content on the page is delivered.

2 Likes