重定向是否比返回其他类型的结果效率低?我问是因为如果我当前的请求是异步的,我想返回一个只包含相关数据的部分请求。否则我需要渲染整个页面。所以我正在考虑将重定向返回到将返回 View 的操作方法。我的理解是重定向将响应浏览器指示它请求新的 url。这实际上意味着 2 个请求。开销很大吗?这是不好的做法吗?这对 SEO 意味着什么?
最佳答案
a redirect will respond to the browser instructing it to request the new url. This effectively means 2 requests.
正确。
Is the overhead substantial?
嗯...这是两个请求。
Is this bad practice?
没有。在处理 POST 后需要它。
http://en.wikipedia.org/wiki/Post/Redirect/Get
What will this mean in terms of SEO?
首先取决于您的 URI 是否有意义。
关于asp.net-mvc - 重定向是否比返回其他类型的结果效率低?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3620716/