Reputation: 51274
When I refresh a page, browsers retain the scroll position of the page if there is a #
in the URL, How to over ride this behavior and scroll to the top of the screen without using JavaScript.
My URL is like http://example.com/#
Update
By default the URL is http://example.com/
and the # character is added to the URL upon clicking some part of the page.
Upvotes: 1
Views: 441
Reputation: 2591
Anyway you have a # symbol either in form action or in link href.
Replace # with javascript:;
in links.
Replace # with index.php
or leave blank (<form action=""...
) in forms.
Upvotes: 0
Reputation: 20721
In case you have a <form action="#" ...>
somewhere, that's your culprit. Change it to <form action="" ...>
.
Upvotes: 1