distinguish refreshed or clicked in middlewarejs
Unanswered
Air Penguin posted this in #help-forum
can middlewarejs distinguish whether the current route is refreshed or clicked to redirect?
@alfon
@alfon
6 Replies
try checking fom the headers
headers().get('sec-fetch-dest') if equal "document" means its refreshed or direct accessif else, its navigated via <Link> or router.push
will browsers exhibit different behaviors?
@Air Penguin will browsers exhibit different behaviors?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest
shouldnt be, its well documented
shouldnt be, its well documented
okok,thank you very much