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

How to handle browser back button ?

Expand Messages
  • colmaengusmurphy
    Hi folks, I have a web page containing a YUI datatable which gets its data from a remote server using YAHOO.util.Connect.asyncRequest. My problem is that if a
    Message 1 of 4 , Mar 3, 2009
      Hi folks,

      I have a web page containing a YUI datatable which gets its data from
      a remote server using YAHOO.util.Connect.asyncRequest.

      My problem is that if a user clicks on a link in the table after it
      has loaded and then clicks back in their browser, the table is loaded
      again from the remove server.

      Since some tables can take 10-20 seconds this can be a pain.

      Any ideas on how to handle this ?

      Would using dataSource maxCacheEntries be the way to go ? Any examples
      of this in use ?

      Cheers

      Colm A
    • Satyam
      There is very little YUI can do about this. When you navigate from one page to the next, the whole environment in which the YUI application was running
      Message 2 of 4 , Mar 3, 2009
        There is very little YUI can do about this. When you navigate from one
        page to the next, the whole environment in which the YUI application was
        running completely disappears, each new page is initialized anew by the
        browser, all memory wiped out, the cache the DataSource can keep would
        be likewise wiped out.

        Anyway, the 10-20 seconds delay is not just in fetching the data,
        actually, with good communication lines and a good server, you will find
        that most of that delay is not in the communication at all. For a few
        hundred records, the times you quote are what IE normally takes to draw
        the DataTable once it got the data. Other browsers are significantly
        faster, order of magnitude faster. So, even if you had all the data
        still stored (and there are a few ways to do it), you would not gain
        much, not in IE.

        So, your solution would be preserving the initial table by either
        opening the links in a separate page/tab and thus preserving the initial
        table.

        Satyam

        colmaengusmurphy escribió:
        > Hi folks,
        >
        > I have a web page containing a YUI datatable which gets its data from
        > a remote server using YAHOO.util.Connect.asyncRequest.
        >
        > My problem is that if a user clicks on a link in the table after it
        > has loaded and then clicks back in their browser, the table is loaded
        > again from the remove server.
        >
        > Since some tables can take 10-20 seconds this can be a pain.
        >
        > Any ideas on how to handle this ?
        >
        > Would using dataSource maxCacheEntries be the way to go ? Any examples
        > of this in use ?
        >
        > Cheers
        >
        > Colm A
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.0.237 / Virus Database: 270.11.6/1980 - Release Date: 03/02/09 23:02:00
        >
        >
      • Colm Aengus Murphy
        Hi Satyam, Thanks the the reply. As it happens a lot of the 10-20 seconds delay is on the server side. I ve spent some time optimizing the client end of things
        Message 3 of 4 , Mar 4, 2009
          Hi Satyam,

          Thanks the the reply.
          As it happens a lot of the 10-20 seconds delay is on the server side.
          I've spent some time optimizing the client end of things by using client-side pagination (hence my earlier ticket, which I'll post a blog entry on when I get a chance).

          Regards

          Colm A

          Satyam wrote:

          There is very little YUI can do about this. When you navigate from one
          page to the next, the whole environment in which the YUI application was
          running completely disappears, each new page is initialized anew by the
          browser, all memory wiped out, the cache the DataSource can keep would
          be likewise wiped out.

          Anyway, the 10-20 seconds delay is not just in fetching the data,
          actually, with good communication lines and a good server, you will find
          that most of that delay is not in the communication at all. For a few
          hundred records, the times you quote are what IE normally takes to draw
          the DataTable once it got the data. Other browsers are significantly
          faster, order of magnitude faster. So, even if you had all the data
          still stored (and there are a few ways to do it), you would not gain
          much, not in IE.

          So, your solution would be preserving the initial table by either
          opening the links in a separate page/tab and thus preserving the initial
          table.

          Satyam

          colmaengusmurphy escribió:
          > Hi folks,
          >
          > I have a web page containing a YUI datatable which gets its data from
          > a remote server using YAHOO.util.Connect. asyncRequest.
          >
          > My problem is that if a user clicks on a link in the table after it
          > has loaded and then clicks back in their browser, the table is loaded
          > again from the remove server.
          >
          > Since some tables can take 10-20 seconds this can be a pain.
          >
          > Any ideas on how to handle this ?
          >
          > Would using dataSource maxCacheEntries be the way to go ? Any examples
          > of this in use ?
          >
          > Cheers
          >
          > Colm A
          >
          >
          >
          > ------------ --------- --------- ------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > ------------ --------- --------- --------- --------- --------- -
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 8.0.237 / Virus Database: 270.11.6/1980 - Release Date: 03/02/09 23:02:00
          >
          >


          -- 
          ---------------------------------------------------------------------
           Colm Aengus Murphy,                Tel       : +353 1 2911000
           Release Manager,                   Direct Tel: +353 1 2911373
           Consumer Mobile,
           Silicon & Software Systems,        Fax       : +353 1 2911001
           South County Business Park,
           Leopardstown,                      E-mail: colm.murphy@...
           Dublin 18.                         WWW   : www.s3group.com
           Ireland
          ---------------------------------------------------------------------
          


          The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s). Please direct any additional queries to: communications@.... Thank You. Silicon and Software Systems Limited. Registered in Ireland no. 378073. Registered Office: South County Business Park, Leopardstown, Dublin 18


        • Satyam
          Yes, right! I write my replies context free , I don t pay much attention to who writes what. If I can answer, i do. But yes, I do remember your report on
          Message 4 of 4 , Mar 4, 2009
            Yes, right! I write my replies 'context free', I don't pay much
            attention to who writes what. If I can answer, i do. But yes, I do
            remember your report on your findings. I always check the YUI blog so I
            hope to read it when it comes out.

            Cheers

            Satyam

            Colm Aengus Murphy escribió:
            > Hi Satyam,
            >
            > Thanks the the reply.
            > As it happens a lot of the 10-20 seconds delay is on the server side.
            > I've spent some time optimizing the client end of things by using
            > client-side pagination (hence my earlier ticket, which I'll post a
            > blog entry on when I get a chance).
            >
            > Regards
            >
            > Colm A
            >
            > Satyam wrote:
            >>
            >> There is very little YUI can do about this. When you navigate from one
            >> page to the next, the whole environment in which the YUI application was
            >> running completely disappears, each new page is initialized anew by the
            >> browser, all memory wiped out, the cache the DataSource can keep would
            >> be likewise wiped out.
            >>
            >> Anyway, the 10-20 seconds delay is not just in fetching the data,
            >> actually, with good communication lines and a good server, you will find
            >> that most of that delay is not in the communication at all. For a few
            >> hundred records, the times you quote are what IE normally takes to draw
            >> the DataTable once it got the data. Other browsers are significantly
            >> faster, order of magnitude faster. So, even if you had all the data
            >> still stored (and there are a few ways to do it), you would not gain
            >> much, not in IE.
            >>
            >> So, your solution would be preserving the initial table by either
            >> opening the links in a separate page/tab and thus preserving the initial
            >> table.
            >>
            >> Satyam
            >>
            >> colmaengusmurphy escribió:
            >> > Hi folks,
            >> >
            >> > I have a web page containing a YUI datatable which gets its data from
            >> > a remote server using YAHOO.util.Connect.asyncRequest.
            >> >
            >> > My problem is that if a user clicks on a link in the table after it
            >> > has loaded and then clicks back in their browser, the table is loaded
            >> > again from the remove server.
            >> >
            >> > Since some tables can take 10-20 seconds this can be a pain.
            >> >
            >> > Any ideas on how to handle this ?
            >> >
            >> > Would using dataSource maxCacheEntries be the way to go ? Any examples
            >> > of this in use ?
            >> >
            >> > Cheers
            >> >
            >> > Colm A
            >> >
            >> >
            >> >
            >> > ------------------------------------
            >> >
            >> > Yahoo! Groups Links
            >> >
            >> >
            >> >
            >> > ----------------------------------------------------------
            >> >
            >> >
            >> > No virus found in this incoming message.
            >> > Checked by AVG - www.avg.com
            >> > Version: 8.0.237 / Virus Database: 270.11.6/1980 - Release Date:
            >> 03/02/09 23:02:00
            >> >
            >> >
            >>
            >
            > --
            > ---------------------------------------------------------------------
            > Colm Aengus Murphy, Tel : +353 1 2911000
            > Release Manager, Direct Tel: +353 1 2911373
            > Consumer Mobile,
            > Silicon & Software Systems, Fax : +353 1 2911001
            > South County Business Park,
            > Leopardstown, E-mail: colm.murphy@...
            > Dublin 18. WWW : www.s3group.com
            > Ireland
            > ---------------------------------------------------------------------
            >
            >
            >
            >
            > ------------------------------------------------------------------------
            > The information contained in this e-mail and in any
            > attachments is confidential and is designated solely for
            > the attention of the intended recipient(s). If you are not
            > an intended recipient, you must not use, disclose, copy,
            > distribute or retain this e-mail or any part thereof. If
            > you have received this e-mail in error, please notify the
            > sender by return e-mail and delete all copies of this
            > e-mail from your computer system(s). Please direct any
            > additional queries to: communications@.... Thank
            > You. Silicon and Software Systems Limited. Registered in
            > Ireland no. 378073. Registered Office: South County
            > Business Park, Leopardstown, Dublin 18
            > ------------------------------------------------------------------------
            >
            >
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - www.avg.com
            > Version: 8.0.237 / Virus Database: 270.11.7/1982 - Release Date: 03/03/09 16:09:00
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.