Forum:Refresh

How to add that little option check box that said something like "automatic Refresh" into a page? Mand&#39;alor Skyobiliviator The Devastator 02:59, September 25, 2011 (UTC)


 * See here--
 * I don't get it. Can you explain to me? I want this on one normal page, not on recent activities, or that such... Mand&#39;alor Skyobiliviator The Devastator 06:43, September 25, 2011 (UTC)


 * Add importScriptPage('AjaxRC/code.js', 'dev'); to MediaWiki:Common.js and also add ajaxPages = ["NameOfPageOne","NameOfPageTwo"]; to Common.js. Make sure to replace NameOfPage# with the page(s) you want. If you only want it on one page, remove the ,"NameOfPageTwo" part.
 * Thanks, now how to adjust the reload time? Sorry for delay, have to block somebody. Mand&#39;alor Skyobiliviator The Devastator 07:04, September 25, 2011 (UTC)


 * Add this: var ajaxRefresh = #000; to Common.js, change # to how many seconds you want the reload time to be.
 * When you put in the page names, do you want to keep the quotations(" ")?Mand&#39;alor Skyobiliviator The Devastator 07:14, September 25, 2011 (UTC)


 * Yes.
 * How long does it take to become active? Mand&#39;alor Skyobiliviator The Devastator 07:21, September 25, 2011 (UTC)

Keep clearing your cache and it should work after a few minutes. Also, if the page name has spaces, you have to use _ instead of a space in the page name in the JS.


 * Okay, isn't 01000 = to 1 sec? Mand&#39;alor Skyobiliviator The Devastator 07:31, September 25, 2011 (UTC)

1000 is 1 second.


 * Do notice that most people find it very annoying that their pages get automatically refreshed. Most modern browsers also prevent it from happening and that you could also force a page to be cleared from cache by adding the purge command, renewing it instead of reloading it (because most commonly used pages will be retrieved from cache rather then from the actual main server). The purge command can easily be forced by replacing the edit command and reloading the page. So instead of the line index.php?title=Forum:Refresh&action=edit you change edit to purge and reload that. It will ask if you want to clear the cache and you need to confirm. Don't use this frequently because it does put more resources on the main server instead of the caching server.


 * At Mythrun, is this how it suppose to look? Because it don't work. Mand&#39;alor Skyobiliviator The Devastator 01:24, September 26, 2011 (UTC)
 * At Mythrun, is this how it suppose to look? Because it don't work. Mand&#39;alor Skyobiliviator The Devastator 01:24, September 26, 2011 (UTC)