Q
In a single-page application, what does history.pushState() allow?
-
A
Changing the URL and adding a history entry without reloading the page
-
B
Opening a new tab
-
C
Reloading the page
-
D
Clearing the history
Correct Answer:
A. Changing the URL and adding a history entry without reloading the page
Explanation:
Client-side routers use it, and the popstate event handles the Back button.