|
If the user went to page:
somedomain.com/somepage.html
and clicked on an internal anchor:
somedomain.com/somepage.html#someanchor
and then refreshed the page, the refresh would request:
somedomain.com/somepage.html#someanchor
which is why it jumps to the same position in the page. That's the nature of refresh/reload ... get whatever is in the address bar, again. You can't do anything about that from your end except to fool the visitor into thinking they are doing a refresh when they are really reloading the raw page without the anchor reference, like:
<a href="somepage.html">Refresh This Page</a>
That's about all you've got. If they use their browser's refresh/reload button, it's in the hands of the browser.
<edit>
Using Javascript, you could add an event trigger that detects a reload event, like setting a cookie and checking for the same page request then modifying that request to go to the root page, or something. But there is no "onreload" Javascript event to grab, and onunload is unsatisfactory for this (happens both on a refresh and when they click a link to another resource or type something else into the address bar). You can force a reload using "location.reload()", but that doesn't detect a user refresh, so ...
</edit>
Last edited by StupidScript; 12-15-2006 at 05:03 PM..
|