TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pardeep
NA
11
1.8k
Chrome: Throttling history state changes
Dec 9 2019 4:49 AM
I am just changing the url when page go to particular height. but it shows me error in the chrome :Throttling history state changes to prevent the browser from hanging. after 1200 height. but it is working fine in the firefox.
function
myFunction() {
var
h = ($(
"html"
).scrollTop());
if
(h == 0) {
window.history.pushState(
null
,
null
,
'/'
);
// console.log("0oo");
}
else
if
(h >= 1 && h <= 600) {
window.history.pushState(
null
,
null
,
"abc"
);
// console.log("test");
}
else
if
(h >= 600 && h <= 1200) {
history.pushState(
null
,
null
,
'def'
);
// console.log("test1");
}
else
if
(h >= 1200 && h <= 1800) {
history.pushState(
null
,
null
,
'ghi'
);
// console.log("test2");
}
else
if
(h >= 1800 && h <= 2400) {
history.pushState(
null
,
null
,
'jkl'
);
// console.log("test3");
}
else
if
(h >= 2400 && h <= 3000) {
history.pushState(
null
,
null
,
'mno'
);
// console.log("test4");
}
else
if
(h >= 3000 && h <= 3600) {
history.pushState(
null
,
null
,
'pqr'
);
// console.log("test5");
}
else
if
(h >= 3600 && h <= 4200) {
history.pushState(
null
,
null
,
'stu'
);
// console.log("test6");
}
else
{
}
}
Reply
Answers (
2
)
What is Reactjs?
Import Excel and display in Ag Grid