Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

history javascript

// Should be null because we haven't modified the history stack yet
console.log(`History.state before pushState: ${history.state}`);

// Now push something on the stack
history.pushState({name: 'Example'}, "pushState example", 'page3.html');

// Now state has a value.
console.log('History.state after pushState: ', history.state);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #history #javascript
ADD COMMENT
Topic
Name
9+6 =