getting last page URL from history object - cross browser?

后端 未结 2 1386
南笙
南笙 2020-12-04 01:58

Is it possible to get last page URL from the history object? I\'ve come accross history.previous but that\'s either undefined or protected from what I\'ve s

2条回答
  •  抹茶落季
    2020-12-04 02:23

    Not from the history object, but from document.referrer. If you want to get the last actual page visited, there is no cross-browser way without making a separate case based on support for each property.

提交回复
热议问题