DEV Community

Kimliberate
Kimliberate

Posted on

Django Page Refresh

I built a mini social media website. Everything works fine but i noticed that whenever i redirect from my backend the whole page refreshes. For instance, a user creates a post and i visit their profile.

If i click the like button to like the post, my backend receives the request and does the necessary things and then redirects me to

#f"/profile/{user}"
Enter fullscreen mode Exit fullscreen mode

as the response and also where I'm coming from. But the issue is that the page scroll position goes back to top meanwhile the post i liked is at the button.

Thanks for your help in advance.

Top comments (0)