Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I think the main problem the author wants to point out is another (and if it's not, it should be ;-). Say you have a dynamic page search.cgi (or search.jsp, search.asp, search.shtml, whatever) which allows logged-in users to look for books in an online book-store. When you pass it parameter author=asimov it looks for all available books by Asimov, and since there are more than 10, it stores all of them in an array in the session object. It outputs a html page with the first 10 results and a link to search.cgi?start=11. By clicking on the link, the page retrieves the array of Asimov's books from the session object and builds a page with the next 10 results. All's well.

Now, imagine you are browsing the bookstore site looking for books by Asimov and by Lem. You log-in, then middle-click and open another tab to perform a parallel search. After selecting Asimov in a page, you look for Lem in the second one. Asimov's result array is substituted by Lem's books. When you go back to the page with Asimov's books and follow the link "next results", you are quite surprised to find out that Solaris is on the page.

A possible way out of this problem is to assign each query a progressive number within the session and pass it along with parameter start. So, from Asimov's page you go to search.cgi?query=1&start=11 and from Lem's page to search.cgi?query=2&start=11. This requires a bit more work and housekeeping, but can deal with non-linear interaction quite well



The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket

In reply to Re: Re: Falling for the same trap - since 1942 by abell
in thread Falling for the same trap since 1942 by Aristotle

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (4)
    As of 2018-11-12 19:42 GMT
    Find Nodes?
      Voting Booth?
      My code is most likely broken because:

      Results (144 votes). Check out past polls.