Why is the replace() method better than the assign() method?

A Reliable
B Highly manageable
C More efficient
D Handles unconditional loading

Correct Answer: Handles unconditional loading

The difference between assign method and replace(), is that replace() removes the URL of the current document from the document history, meaning that it is not possible to use the “back” button to navigate back to the original document. When a script unconditionally loads a new document, the replace() method is often a better choice than assign().

Related Questions

What is the purpose of the assign() method?
He is better worker than I. Here 'better' is-
How to assign the image source in JavaScript?

Next steps