Loading ...
Sorry, an error occurred while loading the content.

Re: Disable browser caching when using yahoo ajax

Expand Messages
  • carltondickson
    Don t know if this will help but I had a similar problem in that the XML returned by a PHP service I had appeared to be cached and not always correct. I had to
    Message 1 of 3 , Feb 1, 2007
    • 0 Attachment
      Don't know if this will help but I had a similar problem in that the
      XML returned by a PHP service I had appeared to be cached and not
      always correct.

      I had to add this to the generation of the XML

      header("Cache-Control: no-store, no-cache, must-revalidate");
      header("content-type: application/xml");
      echo '<?xml version="1.0" encoding="ISO-8859-15"?>';
      echo 'xml here';


      --- In ydn-javascript@yahoogroups.com, "Lakshmi Subramanian"
      <lsubramanian2@...> wrote:
      >
      >
      >
      > Hi All,
      >
      >
      >
      > I would want to know how I will disable the browser cache when using the
      > yahoo's Ajax.
      >
      > Thanks & Regards
      >
      > Lakshmi , Subramanian
      > Senior Associate Technology,Hotels.com Team| Sapient
      > Bangalore, India
      > desk:+91.80.41047615
      > mobile: +91.9845576076
      > e-mail: lsubramanian2@...
      >
    • randomjuju
      If you don t have control over the headers, you might also fiddling with the URL in some way. For example, you might request do something like this:
      Message 2 of 3 , Feb 1, 2007
      • 0 Attachment
        If you don't have control over the headers, you might also fiddling
        with the URL in some way. For example, you might request do something
        like this:

        ...asyncRequest('GET', 'http://my.data.source/data.php?nocache=' + new
        Date().getTime(), ...);

        The browser will think something new is being requested every time and
        won't cache as a result.

        Hope that helps!

        -Jon

        --- In ydn-javascript@yahoogroups.com, "carltondickson"
        <carltondickson@...> wrote:
        >
        > Don't know if this will help but I had a similar problem in that the
        > XML returned by a PHP service I had appeared to be cached and not
        > always correct.
        >
        > I had to add this to the generation of the XML
        >
        > header("Cache-Control: no-store, no-cache, must-revalidate");
        > header("content-type: application/xml");
        > echo '<?xml version="1.0" encoding="ISO-8859-15"?>';
        > echo 'xml here';
        >
        >
        > --- In ydn-javascript@yahoogroups.com, "Lakshmi Subramanian"
        > <lsubramanian2@> wrote:
        > >
        > >
        > >
        > > Hi All,
        > >
        > >
        > >
        > > I would want to know how I will disable the browser cache when
        using the
        > > yahoo's Ajax.
        > >
        > > Thanks & Regards
        > >
        > > Lakshmi , Subramanian
        > > Senior Associate Technology,Hotels.com Team| Sapient
        > > Bangalore, India
        > > desk:+91.80.41047615
        > > mobile: +91.9845576076
        > > e-mail: lsubramanian2@
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.