[Javascript] Maximun length of an id

tedd tedd at sperling.com
Fri Sep 7 21:49:37 CDT 2007


At 6:37 PM -0700 9/7/07, John Pillion wrote:
>auto generating the form ID's is a way of keeping people from hooking
>into the form for either spamming, hacking, etc.  If the form ID's/names
>are randomly generated each time the page loads, it helps deter anyone
>from automating any script for the form.  It's a technique commonly used
>in bank applications etc.

That's neat.

But you would also have to match the ids in the html with other code 
that depend upon on those ids such js and css.

However, that should be pretty simple to do using php's uniqid() 
which would guarantee that no two id's would be the same and could 
create all the css and js code at the same time.

The result from uniqid () comes in two flavors 13 characters and 32 
characters long -- and is advertised as "very difficult to predict".

Interesting idea.

Thanks,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list