+ 1
How to reset the js script using location.reload()
I have a reload button which i want it to actually reload the entire script I know i could just create an finish function to just call the Start function to just repeat the process,but i liked location.reload which just reloads the page better so I tried it and well it doesnt work on sololearns mobile browser it just showed a blank page,How to reload a page or js in sololearns browser
10 Answers
+ 5
What happens on a reload? It may help to look up Google bugs for this issue, then bugs that are introduced when you try to enable it..
Refreshing the browser and forcing a full new DOM + the server to open new sessions because there's no state tracking is actually relying on ancient internet servers behavior (before AJAX, sockets, SPDY/QUIC, etc). Keeping state and resetting what you need to without round-tripping the connection is newer.
+ 5
Think immersive apps with in-game status updates. White-page reloads (or worse, timeouts crashing to a default browser error) disrupt that experience. :)
+ 3
I Got around this Problem by the Ancient way By reseting all my variables etc and just recalling the main function again
+ 2
It's disabled here (otherwise it would spawn a browser, which would be confusing)
+ 2
I did it on my code memo.... I had many difficulties but now it is okay... this concept force yourself to mind a lot and it was a very good exercise for me finally...
+ 1
my code works perfect In pcs where location.reload is supported,I dont know y mobile sololearns browser doesnt work
0
it's the same problem for me... perhaps a way with the url code of the prog
0
pfffffff and the css anim ?...
0
will try this it clones a div and then the css anim are restarted....
pffff would have been so simple with a location.reload ()......
var elm = this, var newone = elm.cloneNode(true); elm.parentNode.replaceChild(newone, elm);
0
interesting Kirk ok ......