What's wrong with this?
I am trying to make a bookmark script to set a cookie for the current page, to be used by a PHP extension. But it only partially works.
location.reload() works, but history.go(0); doesn't. What am I missing here? or is there any alternative to it?
Note, this is written for me so compatibility/user-friendly isn't an issue.
Further more this is the code before I cut out the comments, CRLF, and other extraneous white space.
location.reload() works, but history.go(0); doesn't. What am I missing here? or is there any alternative to it?
Note, this is written for me so compatibility/user-friendly isn't an issue.
Further more this is the code before I cut out the comments, CRLF, and other extraneous white space.
if(navigator.cookieEnabled)
{
var myKey = window.prompt("Session Key","Sentix");
document.cookie = "XDEBUG_SESSION="+myKey; //Sets the XDEBUG cookie
if(window.confirm("Ok = attempt soft reload/cancel = hard reload"))
{
history.go(0); //Try Soft reload
}
else
{
location.reload();//Hard reload
}
}else {
alert("!navigator.cookieEnabled");
}
