You’re going to need to use a cookie or something like that to track
each user, and what they saw last. The issue is that HTTP (the
transport protocol for the Web) is “stateless”, which means that it
normally doesn’t know or care who asked for anything. Each request is
considered entirely on its own, without any regard for what came
before. Cookies are used to break this behavior, and to allow multiple
requests from the same browser to be considered as parts of a larger
whole, rather than random stabs in the dark, by either the browser
(using JavaScript) or the Web server (using a separate application
server process communicating with the Web server through the CGI
protocols).
When you request a page that contains some JavaScript to randomize a
feature, the script only knows the current request, and can only
figure out what a random number is between 1 and the number of images
in your array of possibilities, and return it – but nothing beyond
that.
So one way you could do this is to ask “does this person have a cookie
with an array of random items?” If no, create a new array of the
possible random items, shuffled, and store it in a cookie. If yes,
then take the first item from that array and remove it so it never
gets used again in that session and use it as the next image. When
they run out of items, such a system would naturally repeat from the
beginning.
There isn’t such a system in existence yet, but it could be written.
Perhaps someone on the Actions list has a moment to code something up?
Walter
On Nov 15, 2010, at 10:04 AM, Richard Lowther wrote:
Yes I understand that but maybe I wrote, as usual, poor English. It
is not the number of times an image appears that I was looking to
control. Essential in fact that in any one session, no matter how
long, each image will continue to re-present itself at random.
What I am wondering is - is it possible prevent an image
immediately appearing again at the next roll of the dice? So in a
group of images labeled ABCDE I never get AA or BB or CC. Yep it’s
not random but I am sure I saw a reference to this possibility
somewhere but as yet have not landed on it. (Due to my somewhat
random search methodology?)
Richard
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options