What is the difference between location.href = url
and location.assign(url)
? Is it something in JavaScript memory consumption? Is there any official recommendation to use?
I consider the location.assign more elegant and readable, but I think it consumes more memory.