admin管理员组文章数量:1307004
In my web.xml created error page tag using 404 error-code to re-direct page. In IE if uncheck the 'Show friendly HTTP error messages' . then only it works fine and displaying re-directed page. If the option is enable then 'Page not display' error occurs. any one tell me what is use of 'Show friendly HTTP error messages' option in IE Internet Option.(tools -> Internet options -> Advanced -> Browsing (Show friendly HTTP error messages)
In my web.xml created error page tag using 404 error-code to re-direct page. In IE if uncheck the 'Show friendly HTTP error messages' . then only it works fine and displaying re-directed page. If the option is enable then 'Page not display' error occurs. any one tell me what is use of 'Show friendly HTTP error messages' option in IE Internet Option.(tools -> Internet options -> Advanced -> Browsing (Show friendly HTTP error messages)
Share Improve this question asked Nov 19, 2012 at 14:25 RajuRaju 1763 silver badges11 bronze badges 1- 5 Why are you using 404 to redirect? Don't do that! – deceze ♦ Commented Nov 19, 2012 at 14:27
2 Answers
Reset to default 8IE Implemented this feature because most users don't know what 404 means and it just confuses them further. Unfortunately for developers that means that useful information or a nicer implementation gets shielded from the user. Jeff Atwood has a decent writeup about 404 pages. One of his suggestions is :
You have to make your customized 404 page larger than 512 bytes, otherwise IE will assume it's a standard web server 404 message and replace it with its own friendly-ized version.
So try making your 404 page more than 512 bytes and see if it is then shown to the user.
An HTTP response consists of the HTTP headers and the HTTP body. The first header contains the HTTP response code, which is a defined set of numeric codes that convey a certain meaning. Some status codes make the client do something specific, others don't. Any response may additionally contain an HTTP body, which is typically the actual page.
A 302 response code instructs the client to try fetching another URL (which is also contained in the headers).
A 404 response indicates that the page that was being requested does not exist. It means "error".
See http://en.wikipedia/wiki/Http_status_codes for more.
In either case, if the response also contains an HTTP body, the browser may or may not use this somehow. It is up to it. Typically a 302 redirect response does not contain a body, while a 404 error response contains some HTML page stating "sorry, something went wrong". Often, that is only the standard ugly default Apache error document.
If that IE option is turned off, IE will simply display the error page received from the server. If the option is on, it will put up its own pretty, "helpful" error page if it receives a 404 error which seems unhelpful.
And now the important part:
Don't "redirect" using 404 pages! They mean "error", not "redirect". Use 302 responses and the HTTP Location
header to redirect, not HTML meta tags or Javascript hacks.
本文标签: javascriptwhat is the purpose of 39Show friendly HTTP error messages39 option in IEStack Overflow
版权声明:本文标题:javascript - what is the purpose of 'Show friendly HTTP error messages' option in IE - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741832909a2400041.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论