S
S
Sergey2018-07-20 16:23:47
JavaScript
Sergey, 2018-07-20 16:23:47

Is it possible to determine that the user has refreshed the page and not followed a link or entered an address in the address bar?

This is necessary to redirect the user to another page if he simply did not refresh the same page.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2018-07-20
@Fragster

https://developer.mozilla.org/ru/docs/Web/API/Docu...

I
Ihor Bratukh, 2018-07-20
@BRAGA96

Where did you move from:

document.referrer
// Вернет пустую строку если перейти через адресную строку

Story length:
window.history
// Длинна истории

You can use localStorage or Cookie and connect with these checks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question