What's the difference between window.location.assign(url)
and window.open(url, '_self')
?
Related questions:
Functionally? Not much. They do similar things in different ways.
Personally, I'd probably choose window.location over window.open. Even though they do the same things, using window.location for changing the current window is more common, and doesn't require knowing about '_self', which isn't used that often. My experience is my coworkers expect window.open to involve opening a window versus reusing the same one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With