websitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsitewebsite
website
ipower web
 [520 visits]Ads by Web Top Links Powered by gdshop gdshop reseller APi 
home | web hot tips | web top links | web top services
Web Tips
Select a category ¬

 Apache CSS Commerce Domains Flash Free Service HTML Hosting JavaScript MySQL PHP Promotion Resellers Servers XML


Use standard redirects: don't break the back button!:  
  • [43889] Use standard redirects: don't break the back button! ¬

    Techniques to use and techniques to avoid

    Don't use "refresh" to redirect

    If you want http://www.example.org/foo to actually display what's at http://www.example.org/bar you should not use "refresh" techniques like :

    <META HTTP-EQUIV=REFRESH CONTENT="1; URL=http://www.example.org/bar">.

    Why? because it could break the "back" button. Imagine that the user presses the "back" button, the refresh would work again, and the user would bounce forward. The user will most likely get very annoyed, and close the window, which is probably not what you, as the author of this page, want.

    Use HTTP redirects instead

    When using the "refresh" meta-tag to create a redirection, what we have is a specific instruction within the document. The User Agent (be it a browser or the Markup Validator) is expected to download the page, look at its contents, find the "refresh" instruction, wait the specified amount of time (which could just happen to be "0" seconds for an "immediate" refresh, but really could be anything), and then proceed to the new address.

    A "HTTP Redirect" on the other hand acts much more directly because it is done within another layer. When the User Agent (i.e. a browser or the validator) first contacts the server and requests the document, the _server_ itself, having been configured to redirect the document to another address, replies to the user-agent that it should instead look at the new address.

    A "HTTP Redirect" is also a richer way to redirect because it gives the User Agent more information than just the new address: the server also gives some information about the purpose and type of redirection, which allows the User Agent to behave differently depending on the type of redirect. The different types of HTTP redirects are as follow (with the relevant HTTP status code sent by the server) are the Permanent Redirect (HTTP 301), the Temporary Redirect (307), and the undefined redirect (302).


    Vía: www.w3.org/QA/Tips/reback »



Tip Of The Day:  
  • [43266] Choose URIs wisely ¬

    Few things are more annoying than going to your favorite shop and seeing that the shop has closed or moved without giving its new location... The shop owner may have had a lot of good reasons to do this, but invariably the cause for this unpleasant situation is lack of good planning and management


Domains   •   Hosting   •   Servers   •   Shopping Carts   •   SSL Certificates   •   Web Services   •   APi Resellers   •   Top

website
website website