How to refresh the page with out going to top of the page?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to refresh the page with out going to top of the page??

Hi Friends, when refreshing the sololearn by scrolling down it resides at same spot ,while some other websites https://getmdl.io/templates/android-dot-com/index.html refreshing by scrolling down it goes to top of the page.. Can anyone help me how to solve this issue??? It should stay in stay same spot whenever I am refreshing.

23rd Aug 2018, 10:39 AM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
7 Answers
+ 1
This question is confusing as it reads like you are expressing a technical issue or inconvenience with SoloLearn, but maybe what you are asking for is how to implement the same effect in your own project? If so, you would need a script to detect the last scroll position, store it in the browser's cache, and retrieve it when the page is next loaded. https://stackoverflow.com/questions/17642872/refresh-page-and-keep-scroll-position
23rd Aug 2018, 11:13 AM
Janningā­
Janningā­ - avatar
+ 1
@Janning Thank you my friend..
4th Sep 2018, 11:32 AM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
0
refreshing a page by default does not keep your position when scrolling, so unless it's a specialized browser or site that isn't doable afaik
23rd Aug 2018, 10:42 AM
hinanawi
hinanawi - avatar
0
@hinanawi Please get my question well friend.. Scroll down the page at last and Press F5 for refreshing.. The page won"t go top where it stays at the place where you scrolled down.. Can you get my question friend??
23rd Aug 2018, 10:58 AM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
0
Dhiviya Thirumavalavan your question asked if there's a way to stay in the same spot on a webpage when refreshing: "It should stay in the same spot whenever i am refreshing" i said that unless the website specifically adds that feature, it isn't doable (at least to my knowledge)
23rd Aug 2018, 11:00 AM
hinanawi
hinanawi - avatar
0
hinanawi Thank you my friend. If you are finding any solution for my question please post the answer.
23rd Aug 2018, 11:06 AM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
0
:)
4th Sep 2018, 12:26 PM
Janningā­
Janningā­ - avatar