Ajax caching on pages...

Discussion in 'Javascript' started by Mel, Mar 19, 2007.

  1. Mel

    Mel Guest

    I have a page with a <DIV> that gets updated every 10 seconds. The
    problem is that unless the browser is configured to get new pages at
    all times, it displays the page from cache.

    Is there a way to prevent this from happenning ?
     
    Mel, Mar 19, 2007
    #1
    1. Advertising

  2. Mel

    Ivan Marsh Guest

    On Mon, 19 Mar 2007 17:54:30 -0400, Randy Webb wrote:

    > Good Man said the following on 3/19/2007 5:03 PM:
    >> Randy Webb <> wrote in
    >> news::
    >>
    >>> Mel said the following on 3/19/2007 11:45 AM:
    >>>> I have a page with a <DIV> that gets updated every 10 seconds. The
    >>>> problem is that unless the browser is configured to get new pages at
    >>>> all times, it displays the page from cache.
    >>>>
    >>>> Is there a way to prevent this from happenning ?
    >>> Yes, use a unique URL by adding a timestamp to the URL.

    >>
    >> if you can get to the headers, you can help it too... here is a snippet
    >> of code from my PHP generating pages:
    >>
    >> //IE actually caches ajax pages. Just another reason to hate that
    >> browser.

    >
    > Hate a browser because it doesn't act the way you want it to instead of
    > learning how to code it. Intuitive.


    It's pretty easy to hate a browser that continually shifts its
    "standards", I've seen many websites that render fine in IE6 that don't
    render properly in IE7.

    The function of a browser is write once display anywhere... so this is
    clearly a failure on MS's part not in the programmers.
     
    Ivan Marsh, Mar 19, 2007
    #2
    1. Advertising

  3. Mel

    Ivan Marsh Guest

    On Mon, 19 Mar 2007 18:24:17 -0400, Randy Webb wrote:

    > Ivan Marsh said the following on 3/19/2007 6:11 PM:
    >> On Mon, 19 Mar 2007 17:54:30 -0400, Randy Webb wrote:
    >>
    >>> Good Man said the following on 3/19/2007 5:03 PM:
    >>>> Randy Webb <> wrote in
    >>>> news::
    >>>>
    >>>>> Mel said the following on 3/19/2007 11:45 AM:
    >>>>>> I have a page with a <DIV> that gets updated every 10 seconds. The
    >>>>>> problem is that unless the browser is configured to get new pages at
    >>>>>> all times, it displays the page from cache.
    >>>>>>
    >>>>>> Is there a way to prevent this from happenning ?
    >>>>> Yes, use a unique URL by adding a timestamp to the URL.
    >>>> if you can get to the headers, you can help it too... here is a snippet
    >>>> of code from my PHP generating pages:
    >>>>
    >>>> //IE actually caches ajax pages. Just another reason to hate that
    >>>> browser.
    >>> Hate a browser because it doesn't act the way you want it to instead of
    >>> learning how to code it. Intuitive.

    >>
    >> It's pretty easy to hate a browser that continually shifts its
    >> "standards", I've seen many websites that render fine in IE6 that don't
    >> render properly in IE7.

    >
    > I guess you have never tried dynamically creating a table in IE/FF then?
    > IE gets it right, FF gets it dead wrong. The list is endless both ways.
    >
    >> The function of a browser is write once display anywhere...

    >
    > No, the function of a browser is to display the resource given to it.
    >
    >> so this is clearly a failure on MS's part not in the programmers.

    >
    > The same can also be said about FF, Mozilla, Opera, Safari and any other
    > browser you want to name. Doesn't mean you hate the browser, it means
    > you learn how to deal with it.


    So you think it's perfectly okay for three versions of the same browser
    from the same company to display the same information three different ways?

    You're very forgiving.
     
    Ivan Marsh, Mar 19, 2007
    #3
  4. Mel

    Ivan Marsh Guest

    On Mon, 19 Mar 2007 19:05:22 -0400, Randy Webb wrote:

    > Ivan Marsh said the following on 3/19/2007 6:26 PM:
    >> On Mon, 19 Mar 2007 18:24:17 -0400, Randy Webb wrote:
    >>
    >>> Ivan Marsh said the following on 3/19/2007 6:11 PM:
    >>>> On Mon, 19 Mar 2007 17:54:30 -0400, Randy Webb wrote:
    >>>>
    >>>>> Good Man said the following on 3/19/2007 5:03 PM:
    >>>>>> Randy Webb <> wrote in
    >>>>>> news::
    >>>>>>
    >>>>>>> Mel said the following on 3/19/2007 11:45 AM:
    >>>>>>>> I have a page with a <DIV> that gets updated every 10 seconds.
    >>>>>>>> The problem is that unless the browser is configured to get new
    >>>>>>>> pages at all times, it displays the page from cache.
    >>>>>>>>
    >>>>>>>> Is there a way to prevent this from happenning ?
    >>>>>>> Yes, use a unique URL by adding a timestamp to the URL.
    >>>>>> if you can get to the headers, you can help it too... here is a
    >>>>>> snippet of code from my PHP generating pages:
    >>>>>>
    >>>>>> //IE actually caches ajax pages. Just another reason to hate that
    >>>>>> browser.
    >>>>> Hate a browser because it doesn't act the way you want it to instead
    >>>>> of learning how to code it. Intuitive.
    >>>> It's pretty easy to hate a browser that continually shifts its
    >>>> "standards", I've seen many websites that render fine in IE6 that
    >>>> don't render properly in IE7.
    >>> I guess you have never tried dynamically creating a table in IE/FF
    >>> then? IE gets it right, FF gets it dead wrong. The list is endless
    >>> both ways.
    >>>
    >>>> The function of a browser is write once display anywhere...
    >>> No, the function of a browser is to display the resource given to it.
    >>>
    >>>> so this is clearly a failure on MS's part not in the programmers.
    >>> The same can also be said about FF, Mozilla, Opera, Safari and any
    >>> other browser you want to name. Doesn't mean you hate the browser, it
    >>> means you learn how to deal with it.

    >>
    >> So you think it's perfectly okay for three versions of the same browser
    >> from the same company to display the same information three different
    >> ways?

    >
    > Just curious, but did you ask the same thing when NS7 came out with
    > regards to three different versions displaying the same information
    > three different ways? Or, is it just MS that makes it "different"?


    I do remember one occasion where minor changes in the way Netscape
    rendered caused issue with some web sites... in Netscape 6.0
     
    Ivan Marsh, Mar 20, 2007
    #4
  5. Mel

    Ivan Marsh Guest

    On Tue, 20 Mar 2007 12:18:48 -0400, Randy Webb wrote:

    > Ivan Marsh said the following on 3/20/2007 10:45 AM:
    >> On Mon, 19 Mar 2007 19:05:22 -0400, Randy Webb wrote:
    >>
    >>> Ivan Marsh said the following on 3/19/2007 6:26 PM:
    >>>> On Mon, 19 Mar 2007 18:24:17 -0400, Randy Webb wrote:
    >>>>
    >>>>> Ivan Marsh said the following on 3/19/2007 6:11 PM:
    >>>>>> On Mon, 19 Mar 2007 17:54:30 -0400, Randy Webb wrote:
    >>>>>>
    >>>>>>

    > <snip>
    >
    >>>>>> so this is clearly a failure on MS's part not in the programmers.
    >>>>> The same can also be said about FF, Mozilla, Opera, Safari and any
    >>>>> other browser you want to name. Doesn't mean you hate the browser,
    >>>>> it means you learn how to deal with it.
    >>>> So you think it's perfectly okay for three versions of the same
    >>>> browser from the same company to display the same information three
    >>>> different ways?
    >>> Just curious, but did you ask the same thing when NS7 came out with
    >>> regards to three different versions displaying the same information
    >>> three different ways? Or, is it just MS that makes it "different"?

    >>
    >> I do remember one occasion where minor changes in the way Netscape
    >> rendered caused issue with some web sites... in Netscape 6.0

    >
    > Did you "Hate Netscape" or write it off as a cost of progress?


    I can forgive a single incident, maybe even two... but I did stop using
    Netscape shortly after that.

    It's a bit surprising to find there's someone in the world defending
    incompetence, lack of adherence to standards and chaos in general. You
    must be a truly interesting person.
     
    Ivan Marsh, Mar 20, 2007
    #5
  6. Mel

    Ivan Marsh Guest

    On Tue, 20 Mar 2007 19:49:35 -0400, Randy Webb wrote:

    > Ivan Marsh said the following on 3/20/2007 2:35 PM:
    >> On Tue, 20 Mar 2007 12:18:48 -0400, Randy Webb wrote:
    >>
    >>> Ivan Marsh said the following on 3/20/2007 10:45 AM:
    >>>> On Mon, 19 Mar 2007 19:05:22 -0400, Randy Webb wrote:
    >>>>
    >>>>> Ivan Marsh said the following on 3/19/2007 6:26 PM:
    >>>>>> On Mon, 19 Mar 2007 18:24:17 -0400, Randy Webb wrote:
    >>>>>>
    >>>>>>> Ivan Marsh said the following on 3/19/2007 6:11 PM:
    >>>>>>>> On Mon, 19 Mar 2007 17:54:30 -0400, Randy Webb wrote:
    >>>>>>>>
    >>>>>>>>
    >>> <snip>
    >>>
    >>>>>>>> so this is clearly a failure on MS's part not in the programmers.
    >>>>>>> The same can also be said about FF, Mozilla, Opera, Safari and any
    >>>>>>> other browser you want to name. Doesn't mean you hate the browser,
    >>>>>>> it means you learn how to deal with it.
    >>>>>> So you think it's perfectly okay for three versions of the same
    >>>>>> browser from the same company to display the same information three
    >>>>>> different ways?
    >>>>> Just curious, but did you ask the same thing when NS7 came out with
    >>>>> regards to three different versions displaying the same information
    >>>>> three different ways? Or, is it just MS that makes it "different"?
    >>>> I do remember one occasion where minor changes in the way Netscape
    >>>> rendered caused issue with some web sites... in Netscape 6.0
    >>> Did you "Hate Netscape" or write it off as a cost of progress?

    >>
    >> I can forgive a single incident, maybe even two... but I did stop using
    >> Netscape shortly after that.

    >
    > Then I would guess that you don't use IE?
    >
    >> It's a bit surprising to find there's someone in the world defending
    >> incompetence, lack of adherence to standards and chaos in general.

    >
    > I wasn't defending MS, I was questioning the reasoning behind "I hate
    > IE" as it seems that MS is just the target of it. Nothing more, nothing
    > less. If the accusations go across the board then it is fine. But when
    > people say "I hate IE" simply to seem "cool" (think M$ as well) it
    > seems, well, odd.


    There's an alleged group of people in the world that believe it makes them
    seem cool to say "I hate IE"?

    I can't decide which is more ridiculous... that being true or anyone
    caring.
     
    Ivan Marsh, Mar 21, 2007
    #6
    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:
    462
  2. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    843
    Troy Simpson
    Jan 19, 2004
  3. minnie
    Replies:
    1
    Views:
    761
    Andrew Thompson
    Dec 13, 2006
  4. JimLad
    Replies:
    3
    Views:
    948
    JimLad
    Jan 21, 2010
  5. caching and ajax

    , Jul 19, 2006, in forum: Javascript
    Replies:
    0
    Views:
    84
Loading...

Share This Page