The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
True Asynchronous Cron Jobs using Javascript [!AJAX]. No more hanging page loads. Details »» | |||||||||||||||||||||||||||
True Asynchronous Cron Jobs using Javascript [!AJAX]. No more hanging page loads.
Developer Last Online: Dec 2007
How vB's Cron Jobs Work (and the problem with them)
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. How this product works, and how it fixes the problem This add-on fixes the problem. How it works: 1. First it checks to see if the user has Javascript enabled. No Javascript means the standard vB cron image is used, so your scheduled tasks keep running. 2. If Javascript is enabled, then a short snippet of Javascript is inserted at the bottom of the page instead of the cron image. 3. What this Javascript does is first wait until the page is completely loaded. After the page is loaded, it ask for the standard vB cron image, which runs your scheduled task. After the image is loaded, it displays it (it's invisible) at the bottom of the page. It's as simple as that. The advantage of this setup is that the cron image is requested via Javascript after the page is done loading, so that the user doesn't think something is wrong and wonder why the page won't finish loading. Installation Import the product XML via the Product Manager. You can enable/disable the product in the JS Cron Image Options group. Technical Specs This product adds one plugin which inserts Javascript where the vB cron image used to go. That's it. History Version 1.0.0 - Initial Release Version 1.0.1 - Better compatibility with vBa and other 'portal' scripts. $vbulletin->options['bburl'] is prepended to the cron image URL. This product doesn't change how cron jobs execute at all, it only requests the cron image (which starts cron job execution) in a different way, so that the user doesn't have forever-loading pages. If you use this, please click Mark As Installed. Show Your Support
|
Comments |
#52
|
||||
|
||||
That is a problem with vBulletin (with any products you install), and is not directly related to this product. But I hear you, I think it's annoying too.
|
#53
|
||||
|
||||
Quote:
Quote:
Just to answer your mud flinging. The hacked cron file returns less crap that is not needed and prevents many issues that were found using cron.php. The uploaded javascript is cached by the users browser where your inline js must be downloaded with each and every page load. It works fine with vbadvanced. And as far as users without js, it defaults to the normal vb method. Oh, and it only loads when a cron is to be run. Not every page load like this one. And what's best of all, it's original. Nice people don't fling mud. Have a nice day. |
#54
|
||||
|
||||
Quote:
Code Monkey, I offer you my sincerest apologies. I created this mod for my own personal use, and I created it to the best of my abilities. My post that you call 'mud flinging' was an attempt to compare the two mods, only since someone asked. I never told anyone to use my mod instead of yours, everyone's free to use what they want. My personal preference with modifications, is the simpler and more straightforward it is, the better. You have misinformation in your post, concerning both the mods, which I won't respond to. Each user can decide for themselves which mod they want to install, if any. I hope you'll forgive me and not feel that I'm stepping on your toes. I hope we can peacefully coexist here on vB.org. Respectfully, David. |
#55
|
|||
|
|||
I installed this and noticed a significant increase in performance. Better in Firefox than IE though.
|
#56
|
|||
|
|||
Thanks for this! very smart MOD .twothumbsup.
|
#57
|
|||
|
|||
Greatest mod I have so far.... and my forum has pretty much everything.
|
#58
|
|||
|
|||
Indianprofits.com clicks install
|
#59
|
|||
|
|||
thank you , this addon fixed a problem I had with $cronimage and Zoints Tags rewritten urls
|
#60
|
||||
|
||||
Can you add an option were we can set the sizes for posts and signatures separate ?
|
#61
|
|||
|
|||
* Clicks Mark as Uninstalled *
Those annoying hangs in Firefox are a thing of the past! Thanks Analogpoint! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|