- 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 attribute indicates that an input field must be filled out before submitting?
required="required" autofocus="autofocus" placeholder="text"
<input type="text" name="name1" required="required" />
Which CSS method increases or decreases the size of the HTML element (including its content)?
translate() scale() skew()
#some_id:hover {
  transform: scale(2, 1.5);
  -ms-transform: scale(2, 1.5);    /* IE 9 */
  -moz-transform: scale(2, 1.5);   /* Firefox */
}
Click on the Date object method that returns the day of the month.
setDate() getMonth() getDate()
var rightnow = new Date();
var day = rightnow.getDate();
alert(day);
Which function is used to upload a file on server?
is_file() move_uploaded_file() fopen()
if(move_uploaded_file($_FILES["field_name"]["tmp_name"], "dir/file_name")) {
  echo "The file succesfully uploaded";
}
The history object

Last accessed pages

  1. SHA512 Encrypt hash in JavaScript (15637)
  2. Contact page - CoursesWeb (41282)
  3. Tabs effect with CSS (41892)
  4. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (49076)
  5. Get Mouse coordinates inside a Div or an Image (11489)

Popular pages this month

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