You may use the document.referrer
to view the last page history instead of using the history
object.
Also to note that history.previous
property is not available to web content and is not supported by other browsers and it is obsolete.
You may check these references: