X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwho.c;h=bc8c567b9d09ca285565920bdcaab872420d3869;hb=15f40ad964c35ddb0bd680317a15652b130c2c46;hp=0a8cc142039b71b015dc2f363d830b5026a7019e;hpb=e1a2c366821e4f34bd3d84c1b9842300f4240f40;p=citadel.git diff --git a/webcit/who.c b/webcit/who.c index 0a8cc1420..bc8c567b9 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -124,31 +124,22 @@ void who_inner_div(void) { /* - * XML-encapsulated version of wholist inner html + * AJAX-response version of wholist inner html */ void who_inner_html(void) { output_headers(0, 0, 0, 0, 0, 0, 0); - wprintf("Content-type: text/xml;charset=UTF-8\r\n" + wprintf("Content-type: text/html; charset=UTF-8\r\n" "Server: %s\r\n" "Connection: close\r\n" "Pragma: no-cache\r\n" - "Cache-Control: no-store\r\n", + "Cache-Control: no-store, no-cache, must-revalidate\r\n", SERVER); begin_burst(); - wprintf("" - "\r\n" - "\r\n" - ); - who_inner_div(); - wprintf("\r\n" - "\r\n" - "\r\n" - ); - + wprintf("\r\n"); wDumpContent(0); } @@ -174,7 +165,6 @@ void who(void) wprintf("\""); - /* "onLoad=\"javascript:bodyOnLoad()\" " */ wprintf(" "); snprintf(title, sizeof title, _("Users currently on %s"), serv_info.serv_humannode); @@ -188,7 +178,7 @@ void who(void) wprintf("
\n"); wprintf("
"); - who_inner_div(); /* Actual data handled by another function */ + who_inner_div(); wprintf("
\n"); wprintf("
"); @@ -199,20 +189,21 @@ void who(void) wprintf("
\n"); /* JavaScript to make the ajax refresh happen: - * 1. Register the request 'getWholist' which calls the WebCit action 'who_inner_html' - * 2. Register the 'fix_scrollbar_bug' div as one we're interested in ajaxifying - * 3. setInterval to make the ajax refresh happen every 30 seconds. The random number - * in the request is there to prevent the eternally moronic Internet Explorer from - * caching the XML even though it's been told not to. + * * See http://www.sergiopereira.com/articles/prototype.js.html for info on Ajax.Updater + * * It wants: 1. The div being updated + * * 2. The URL of the update source + * * 3. Other flags (such as the HTTP method) + * + * * setInterval() makes it auto-run this code every 30,000 milliseconds (30 seconds) + * + * FIXME b0rken IE is still caching it */ wprintf( - " \n" + " \n" ); - wDumpContent(1); }