开发者

Is a redirect less efficient than returning other types of result?

Is a redirect less efficient than returning other types of result? I ask because if my current request is asynchronous I want to return a partial with only relevant data. Otherwise I need to render the entire page. So I'm thinking of returning a redirect to an action method which will return a View. My understanding is that 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? What will th开发者_如何转开发is mean in terms of SEO?


a redirect will respond to the browser instructing it to request the new url. This effectively means 2 requests.

Correct.

Is the overhead substantial?

Well... it's two requests.

Is this bad practice?

No. It's required after a POST is processed.

http://en.wikipedia.org/wiki/Post/Redirect/Get

What will this mean in terms of SEO?

Depends on whether or not your URI's make sense in the first place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜