you are absolutely right, how foolish of me.

a better way of course would be

url="">
but wait...even with that there is a chance of collission...hmmm

how about you have a static BigInteger in your resource, and use that as a sequence to generate unique ids to append to the url!

-Igor


On 4/7/06, Johan Compagner <[EMAIL PROTECTED]> wrote:


On 4/7/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:

usually i call urlfor(resourcereference), get the url, append "&rand="+Math.random() and use an attributemodifier or oncomponenttag() to set the src attr of an img tag.


Did you calculate the chance you have with Math.random() how many times it could generate the same url after X number of calls?

:)

johan



Reply via email to