load random featured MP with js on page load #309

Closed
davewhiteland opened this Issue Feb 8, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

davewhiteland commented Feb 8, 2012

Currently hoe template loads with a random MP, but our caching is (rightly) not pushing it out to every request.
On page load js could pull in a random MP

@ghost ghost assigned davewhiteland Feb 8, 2012

Contributor

davewhiteland commented Feb 28, 2012

Implemented with #310 -- that is, this only happens auto_advance_enabled = true;
Since this is an AJAX load on document-ready, there is likely to be a flicker of the initial content.
One way to avoid the flicker is to randomly load the next featured person after the auto_advance_delay (say, 12 seconds) but this doesn't really solve the problem of always seeing the same featured person from the server-side cache. This would avoid the flicker of the featured MP reloading as soon as the page loads but it would break the prev/next behaviour within the featured_person box -- that is, the user clicking the "back" chevron wouldn't get back to the person they had just seen, and that seems unacceptable breakage. But maybe others will judge differently.
So: enable locally to see how this plays out and make a decision on whether to call the initial load immediately (which is currently the case) or else on a setTimeout.
code where this happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment