Random Strings

Last updated: 08.05.2002

Interpolate a random string into a page when it is displayed. This technique could be used as an alternative to server-side includes for those who don't have them or don't want to overload the server. The disadvantage, of course, is that all the alternatives have to be downloaded, so you're loading a lot of unnecessary information just to display one string.

In a real example, the 'cannot be displayed' message (which you will see if you don't have a Java-capable/enabled browser, or if you're running Navigator 2.0) should usually be replaced by a default string.

* Source Code

The script will be re-executed each time the page is redrawn. To see more random strings, click the Back button on your browser, then click Forward.

[raingod:resources:javascript] -- [previous][up][next][links][home]