There is a lot about your problem that isn't provided! But here goes . . .

I would change the 'random' number to a positive incrementing number. I keep a variable ($Account{"UPDATE"}) as part of the persistent information about each user. Each time you send information to the server/browser, increment the $Account{"UPDATE"} by 1. Periodically you can reset the value to the start value(like once a year). This seems to work on most browsers. If you don't keep persistent data about the user, then keep a site counter ($Site{"UPDATE"}). (Note: Some browsers treat a lower(random) number different than a higher sequential number) Also set the expiration-date for about 10 seconds in the future. If a user is trying to get new information and the information is available, you want the user to get the newest information. On some browsers, I have hit the 'refresh' button without getting the new info.

If you can tell that no new information is available, you can send a response to indicate that:

## Next line tells the server/browser that nothing has changed! print "Status: 304 No response\r\nContent-Type: text/html\r\n\r\n";
That is a great way to improve bandwidth utilization!

You may want to look at the Memoize Module (it's core on later releases of perl) to help reuse content that doesn't change. For HTML, I compress the data to be saved. 40KB easily reduces to less than 1KB.

If I answered everything but your problem, maybe an example would help. Good Luck!

"Well done is better than well said." - Benjamin Franklin


In reply to Re: Random URLs for pages with dynamic content .. better way? by flexvault
in thread Random URLs for pages with dynamic content .. better way? by locked_user sundialsvc4

Title:
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, details, 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, summary, 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.