Search

11/17/2007

time stamp in javascript

new Date().valueOf();

comp.lang.javascript FAQ - 9.88 - 2007-10-12
Date.valueOf( ): convert a Date to millisecond representation
Object.valueOf( ): the primitive value of the specified object
To reload a page, use location.reload(). However, this depends upon the cache headers that your server sends. To change this, you need to alter the server configuration. A quick fix on the client is to change the page URI so that it contains a unique element, such as the current time. For example: location.replace(location.href+'?d='+new Date().valueOf()) If the location.href already contains a Query String, use: location.replace(location.href+'&d='+new Date().valueOf())

沒有留言: