That's what the back button is for. I will take you back to where you were before you clicked a link, including scroll down the page to the correct position.
Unfortunately, it doesn't work with infinite scroll pages or other stateful types of sites.
Sites like Discourse allow for back button navigation on their infinite scrolls.
Infinite scrolling is another thing that should be avoided.
Unfortunately on Twitter and other infinite scroll pages the back button doesn't take you back to where you were exactly. The position gets thrown off based on the new tweets in the timeline.
Not on Twitter it won't, because when you hit "back", there's 65 new tweets at the top of your timeline, so your position is not the same.
And that brings us to another annoying thing newbie webdevelopers do. Infinitely scrolling webpages. Hate them. Breaks all my old habits with back-buttons, or leaving a webpage open in the browser for the next day to continue reading.
Let's be fair: it's a thing newbie (or newbie-minded) product designers ask for, which the web developers then implement.