HTML5 History API

The HTML5 History API allows us to manipulate the web browser history. The new capabilities this API adds include the possibility to add new entries into the web browser history and to change the visible URL address the web browser shows without any refresh.

The following code sample shows how simple it is to change the URL address the web browser shows without any refresh.

<!DOCTYPE html>
<html>
<head lang="en">
 <meta charset="UTF-8">
 <title></title>
</head>
<body>
 <script type="text/javascript">
 var ob1 = { str: "abc1" };
 window.history.pushState(ob1, "blue data", "blue.html");
 </script>
 <h1>bla bla bla</h1>
</body>
</html>

The following video clip shows the execution of this code sample, overviews it and explains it step by step.

You can find more training material for learning this topic in my Introduction to HTML5 course. You can find its community free version at http://abelski.lifemichael.com.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

What are Anti Patterns?

Anti Patterns

Unlike design patterns, anti patterns just seem to be a solution. However, they are not a solution and they cause additional costs.

Virtual Threads in Java Professional Seminar

Virtual Threads in Java

The use of virtual threads can assist us with improving the performance of our code. Learn how to use virtual threads effectively.

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences