最佳答案
与使用 location.assign(url)相比,使用 location.href = url在 JavaScript 内存消耗方面有什么特别的优缺点吗?
I guess I'm wondering if it takes more memory to access the method as opposed to setting the property.