location.reload(true) and history.go(0) : location « Javascript Objects « JavaScript DHTML






location.reload(true) and history.go(0)

   

<html> 

<head> 
<title>Reload Comparisons</title> 
<script type="text/javascript"> 
function hardReload() { 
    location.reload(true); 
} 
function softReload() { 
    history.go(0); 
} 
</script> 
</head> 
<body> 
<form name="myForm"> 

<input type="button" value="Soft Reload" onclick="softReload()" /> 
<input type="button" value="Hard Reload" onclick="hardReload()" /> 

</form> 
</body> 
</html> 

   
    
    
  








Related examples in the same category

1.Assign a URL to location
2.Location replace
3.Location reload
4.Display properties in location
5.If location is a search, display its value
6.Invoking the location.replace() Method