xmlhttpRequest caching problem

Discussion in 'ASP General' started by jmt, Jun 27, 2005.

  1. jmt

    jmt Guest

    Hi,

    We are having a problem with a xmlhttpRequest request returning a cached
    version of the request - the code we are using is inserted below.
    Has anyone else had this problem before - or have any ideas on what we may
    be doing incorrectly.

    Thanks
    JMT

    ----------------------------

    xmlhttpRequest : function(url)

    {

    var mainPageURL = document.location.href.split("/");

    var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP.3.0");

    try

    {

    var vURL = mainPageURL[0] + "//" + mainPageURL[2] + "/" +
    mainPageURL[3] + "/" + url;

    xmlhttp.open("GET", vURL, false);

    xmlhttp.send();

    if (xmlhttp.statustext != "OK")

    {

    alert("Failed to execute URL " + vURL + ": " +
    xmlhttp.statusText);

    return "";

    }

    else

    return xmlhttp.responseText;

    }

    finally

    {

    xmlhttp = null;

    }

    },


    --
    jmt
     
    jmt, Jun 27, 2005
    #1
    1. Advertising

  2. jmt wrote:
    > Hi,
    >
    > We are having a problem with a xmlhttpRequest request returning a
    > cached version of the request - the code we are using is inserted
    > below.
    > Has anyone else had this problem before - or have any ideas on what
    > we may be doing incorrectly.
    >
    > Thanks
    > JMT
    >


    You showed us your client-side code* which is not where the problem is. The
    problem actually is in the server-side page to which you are sending the
    request. See:
    http://www.aspfaq.com/show.asp?id=2022


    Bob Barrows


    * A better newsgroup for client-side questions is .scripting.jscript. ASP is
    server-side technology, so we focus on server-side questions here.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jun 27, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hypo
    Replies:
    6
    Views:
    447
  2. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    815
    Troy Simpson
    Jan 19, 2004
  3. JimLad
    Replies:
    3
    Views:
    933
    JimLad
    Jan 21, 2010
  4. Dominic Myers

    XMLHttpRequest: problem with IE?

    Dominic Myers, Apr 15, 2005, in forum: Javascript
    Replies:
    2
    Views:
    87
  5. gobera

    XMLHttpRequest and Firefox Problem

    gobera, May 3, 2005, in forum: Javascript
    Replies:
    0
    Views:
    81
    gobera
    May 3, 2005
Loading...

Share This Page