The history in Javascript


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
Is there any way to control the history (except for going back and forth) in Javascript in some common browsers? Or is there a way to track clicks on buttons, forward and back, not to go on them?
Interested in web applications that are actively using ajax.
by | 5 views

3 Answers

0 like 0 dislike
by
0 like 0 dislike
>>Is there any way to control the history (except for going back and forth) in Javascript
\r
history.length
history.go(number)

Another location.replace() overwrites the current history item.
\r
>>if you can somehow keep track of clicking buttons back and forth and not to go on them?
\r
No. But when you go to the link to open the page with redirection to the target page, respectively, pressing back will get a page redirect and return. But I do not recommend, is irritating.
\r
There are still onunload, but it's still wrong.
\r
Of course, if you have the opportunity to expand the current story and go where it is necessary, as in the Opera, this will not help.
by
0 like 0 dislike
Isn't it better just to gently handle these transitions? under a lot of jQuery plugins for this, for other frameworks too. I am now starting to use www.asual.com/jquery/address/ — seems pretty good.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked May 22, 2019 by cashloveyou
0 like 0 dislike
2 answers
asked Apr 12, 2019 by cashloveyou
0 like 0 dislike
1 answer
asked Apr 12, 2019 by cashloveyou
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,978 users