-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
History.JS running settimeout every second because of IE8. #321
Comments
I agree with this. |
I agree as well. The plugin is awesome, however..the unnecessary polling seems to be a hit on performance. |
I agree! |
simple alternative, doing this in local version of file // For Internet Explorer
// target only at IE
if (History.isInternetExplorer())
History.intervalList.push(setInterval(History.onUnload, History.options.storeInterval)); |
I just removed those lines at all as we supported only HTML5 devices. I reported more as an improvement. |
…ecessarily - Primarily for non Internet Explorer browsers
- Only trigger setInterval for IE8 and below
…ecessarily - Primarily for non Internet Explorer browsers
…ecessarily - Primarily for non Internet Explorer browsers
My application on chrome because of this, every second has memory being filled up with almost 1mb of data. Of course, data is garbage collected after a while, but in the mean time, it just causes constant growth of memory usage. |
Hi. It's really unclear WHY to call History.onUnload in ALL browers EVERY SECOND. |
I've just searched and haven't found exactly the same issie open.
I am using jquery.history.js. On the line 3247 you have this code:
as well as this code too:
This code will trigger a clean up on history local storage when user leaves the page. I know that IE 8 has got issues with unload event.
However, all other browsers are being "punished" with this settimeout running every second because of IE8. It seems to be unnecessary as the cross-browser unload can be achieved with this code:
My point is: All other browsers don't need to have this settimout function running all the time. I am building mobile web apps and I am concern about possible battery draining issues.
What do you think?
Btw this library is great man! you guys are doing a f great job!
cheers
Leoanrdo
The text was updated successfully, but these errors were encountered: