javascript history.previous is undefined

Am attempting to capture the previous url as a variable as follows:

            var ref = history.previous;

The output, however, is consistently: "undefined".

Posted by:

Comments History


by: on
sure you can, but you use following for the previous page. var ref = document.referrer Example:
 
by: on
thanks it worked
 

Name :  

Email :  

Comment Below