Hi all,
I am trying to make sure that if my JS executes the user actions are new, and not a page being called from cache, refreshed, or via the backbutton. I've come up with a solution to add a suffix to the url when the page loads and then if any other actions are called with the same suffixes, I know that its not a unique action.

The way I do it is

Code:
var ilocation = document.location;
if (ilocation.indexOf('?') < 1) //make sure its not an infinite loop
{
var suffix = "?beenhere";
document.location = document.location + suffix;
}
While to the user the refresh is invisible, the browser really does re-request the page from the server, so now its 2 calls to the server, one with and one without the suffix, the second one (the refresh with the suffix) the referrer information is reset to the page's url, without the suffix. That doesn't really work for me.

Is there any way to do the same append to the URL, but without causing a browser to call the new page, so then if I look at the url with the document.location call , it has the new url with the suffix?

While, I am here, what's the difference between using document.location and document.location.href ?

Thanks for all the help in advance!