[Javascript] Opening new tabs in FireFox.

Shawn Milo Shawn at Milochik.com
Fri Feb 17 12:10:58 CST 2006


Okay, here's how it worked:

All URLs in a JavaScript array. One cookie for each URL (cookie name *is*
the URL, to make it simple).
When the page loads, it reads the cookies and orders the URLs by the numeric
value (highest to lowest).

The page loads the links in three columns, so the top left is the most-used,
top middle is the second-most used, and so on.

Every time an onclick is fired for a link, it increments the cookie value by
one. So links aren't re-sorted by popularity until a page is refreshed.

To prevent formerly-popular but now unused links from reigning supreme, I
had some sort of logic by which once any link reached a number greater than
x (I forget), every single cookie's value is multiplied by itself
times 0.75or something like that.

If I find the code I'll post it. It was at least three years ago when I did
this.

Shawn

On 2/17/06, Paul Novitski <paul at novitskisoftware.com> wrote:
>
> At 08:53 AM 2/17/2006, Shawn Milo wrote:
> >I want a page of my personal bookmarks which automatically sorts by
> >frequency of use.
>
> Sounds like a nice utility; I'm interested.  How did you persistently
> store total page-requests using JavaScript?  Like you, I think I'd
> rather do this server-side, but the client-side problem is intriguing.
>
> Paul
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060217/5d9ef196/attachment.htm>


More information about the Javascript mailing list