Changeset 14416


Ignore:
Timestamp:
09/19/12 21:23:29 (12 years ago)
Author:
tbretz
Message:
Fixed a problem with the new Chromium browser. It tries to avoid reloading POST pages by sending pre-conditionals. This could actually deacrease traffic (although not much) but does not work, because we would have to store the last report internally to issue it again to cross-check the timout for invalidation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.js

    r14401 r14416  
    3333        var xmlLoad = new XMLHttpRequest();
    3434        xmlLoad.open('POST', "index.php?load", true);
     35        //xmlLoad.setRequestHeader("If-Match", "*");
    3536        xmlLoad.onload = function()
    3637        {
     
    125126    var xmlPage = new XMLHttpRequest();
    126127    xmlPage.open('POST', "struct/"+name+'.page', true);
     128    //xmlPage.setRequestHeader("If-Match", "*");
    127129    xmlPage.onload = function ()
    128130    {
     
    169171    var xmlCmd = new XMLHttpRequest();
    170172    xmlCmd.open('POST', uri, true);
     173    xmlCmd.setRequestHeader("If-Match", "*");
    171174    xmlCmd.onload = function ()
    172175    {
     
    946949    var xmlText = new XMLHttpRequest();
    947950    xmlText.open('POST', "data/"+fname+'.data', true);
     951    //xmlText.setRequestHeader("If-Match", "*");
    948952    xmlText.onload = function ()
    949953    {
    950         if (xmlText.status!=200)
     954//        if (xmlText.status==412)
     955//        {
     956//            timeoutText = setTimeout(refresh_text, 3000);
     957//            return;
     958//        }
     959
     960        if (xmlText.status!=200 && xmlText.status!=412)
    951961        {
    952962            alert("ERROR[2] - HTTP request '"+fname+".data': "+xmlText.statusText+" ["+xmlText.status+"]");
     
    11111121    var xmlGfx = new XMLHttpRequest();
    11121122    xmlGfx.open('POST', "data/"+fname, true);
     1123    xmlGfx.setRequestHeader("If-Match", "*");
    11131124    xmlGfx.onload = function ()
    11141125    {
    1115         if (xmlGfx.status!=200)
     1126//        if (xmlGfx.status==412)
     1127//        {
     1128//            timeoutGraphics = setTimeout(refresh_graphics, 5000);
     1129//            return;
     1130//        }
     1131
     1132        if (xmlGfx.status!=200 && xmlGfx.status!=412)
    11161133        {
    11171134            alert("ERROR[3] - Request '"+fname+"': "+xmlGfx.statusText+" ["+xmlGfx.status+"]");
Note: See TracChangeset for help on using the changeset viewer.