Push state to history in Javascript

Description

history.pushState adds an Entry to the Browser History.

Example


<!DOCTYPE HTML> 
<html> 
    <body> 
        <script type="text/javascript"> 
             window.history.pushState("", "", "?asdf"); 
        </script>
    </body>
</html><!--from ww  w.  ja  v a  2s. co  m-->

Click to view the demo





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window