- The history object is part of the window object, and contains the URLs visited by the user (within a browser window).
It contains useful methods and properties that let you move back and forth through the user's history, and manipulate the contents of the history stack.
- Syntax:

window.history.property_name
window.history.methodName()

• The history object has two properties: length and state.
window.history.length - returns the number of URLs in the history list.
window.history.state - returns the object added in history with pushState() or replaceState().


Methods of the history object

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag adds an image in web page?
<div> <img> <span>
<img src="http://coursesweb.net/imgs/webcourses.gif" width="191" height="63" alt="Courses-Web" />
Which of these CSS codes displays the text oblique?
font-style: italic; text-decoration: underline; font-weight: 500;
#id {
  font-style: italic;
}
Click on the jQuery function used to hide with animation a HTML element.
click() hide() show()
$(document).ready(function() {
  $(".a_class").click(function(){ $(this).hide("slow"); });
});
Click on the correctly defined function in PHP.
fname function() {} function fname() {} function $fname() {};
function fname($a, $b) {
  echo $a * $b;
}
The history object

Last accessed pages

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (79336)
  2. Insert, Select and Update NULL value in MySQL (43073)
  3. Contact page - CoursesWeb (19885)
  4. Tabs effect with CSS (20590)
  5. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (26843)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (2382)
  2. Tabs effect with CSS (2315)
  3. Contact page - CoursesWeb (2310)
  4. Insert, Select and Update NULL value in MySQL (1218)
  5. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (732)