pl804
12-15-2015, 03:39 PM
I noticed back in 2006-07, there were several discussions of behavior where the footer pixel that triggers scheduled tasks caused some browser to hang while the task was being executed.
The best explanation (https://vborg.vbsupport.ru/showthread.php?p=2560530#post2560530) I read was from Analogpoint (who unfort hasn't posted here since 2007):
vBulletin has a great, built-in scheduled task system. It relies on an invisible pixel image output on the bottom of the forum pages to run the scheduled tasks (cron jobs). It works like this: When a user visits a page, vB checks to see if there are any pending cron jobs to execute. If there are, the cron image is inserted at the bottom of the page. That image, instead of displaying a real image, actually calls the scheduled task script which first returns the image, then proceeds to execute the scheduled task. This setup can cause the page load to hang, depending on what browser you're using. vB goes to great lengths to send the content-length header, then flush the image data to the browser. This causes some browsers to stop loading the page even though the script isn't finished running (it has to execute the cron job), since the data returned matches the content-length header. However, not all browsers are that smart. Sometimes they sit there with whatever indicator they have spinning, saying the page is still loading, until the scheduled task has finished.
Several options appeared to address this (including an AJAX modification by CodeMonkey), but then around 2010-11 or so, the discussions tailed off.
I've pinged those threads, but I'm curious if anyone here knows whether this is still an issue? I'm hoping that with current browser versions, this issue has hopefully been resolved.
Thanks in advance.
The best explanation (https://vborg.vbsupport.ru/showthread.php?p=2560530#post2560530) I read was from Analogpoint (who unfort hasn't posted here since 2007):
vBulletin has a great, built-in scheduled task system. It relies on an invisible pixel image output on the bottom of the forum pages to run the scheduled tasks (cron jobs). It works like this: When a user visits a page, vB checks to see if there are any pending cron jobs to execute. If there are, the cron image is inserted at the bottom of the page. That image, instead of displaying a real image, actually calls the scheduled task script which first returns the image, then proceeds to execute the scheduled task. This setup can cause the page load to hang, depending on what browser you're using. vB goes to great lengths to send the content-length header, then flush the image data to the browser. This causes some browsers to stop loading the page even though the script isn't finished running (it has to execute the cron job), since the data returned matches the content-length header. However, not all browsers are that smart. Sometimes they sit there with whatever indicator they have spinning, saying the page is still loading, until the scheduled task has finished.
Several options appeared to address this (including an AJAX modification by CodeMonkey), but then around 2010-11 or so, the discussions tailed off.
I've pinged those threads, but I'm curious if anyone here knows whether this is still an issue? I'm hoping that with current browser versions, this issue has hopefully been resolved.
Thanks in advance.