Can I get the history.back() function to work in Chrome when using the file:// protocol?

前端 未结 5 1585
别那么骄傲
别那么骄傲 2021-01-08 00:41

I\'m building an application in an environment where I\'m restricted to using the local file system and a browser (i.e. running a server isn\'t an option). I have a generic

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-08 01:12

    var referrer = document.referrer; window.location.replace(referrer);

    Use this it will work

提交回复
热议问题