javascript detect visitor information
<p>I use javascript to detect visitor information such as generate a visitor id base on micro second, get screen size, os version and brower version.</p>

<p>It works when I test it. However, when the page goes live, there sometimes cannot get those information. This problem presents as the fields about those information are empty meaning ''. But I have set fields to not NULL and default is undefined.</p>

<p>I was think about that whether the visitor disable javascript but this can't happen because I use ajax to send request, so javascript must be enable, otherwise it won't be recorded in database.</p>

<p>So, what factor will occur this problem?</p>

<p>because the code is too long, so i just can post get id function here</p>

<pre><code>function Initvisiter_id(){
    var visiter_id;
        //alert(sessionStorage.getItem('visiter_id'));
    var date=new Date();
    visiter_id = date.getTime() + Math.floor(Math.random()*1000001);    
    return visiter_id;
}
</code></pre>

<p>server side script to get the request from url</p>

<pre><code>//get parameters from url
    $parameters = $_GET['parameters'];
    $parameters = str_replace('\\','',$parameters);
    $m = json_decode($parameters);
</code></pre>
