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

Ngoc Hue

New member
Why is the replace() method better than the assign() method?
A. Reliable
B. Highly manageable
C. More efficient
D. Handles unconditional loading
 
Answer: d
Explanation: 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().
 

Tìm kiếm

Back
Top