Issue link: https://read.uberflip.com/i/1146286
84 | Chapter 11: Rule 11: Avoid Redirects Even if these approaches are too complex for most links, they work well for links that use the target attribute: Performance - Wikipedia In this case, there is no race condition and a simple image beacon works fine. This approach works well, for example, when tracking impressions (clicks) for pop-up ads. Clicking on a pop-up ad does not unload the current document, allowing the image beacon request to be completed without interruption. Prettier URLs Another motivation for redirects is to make URLs prettier and easier to remember. In the earlier "Missing Trailing Slash" section, I explained how http://astrology.yahoo. com/astrology redirects the user to http://astrology.yahoo.com/astrology/ (the same URL with a "/" appended). A redirect that affects far more users is from http:// astrology.yahoo.com to http://astrology.yahoo.com/astrology/. Clearly, http://astrology. yahoo.com is prettier and easier to remember, so it's good for users that this simple URL works. The Google Toolbar redirects described in the "How Redirects Hurt Performance" section are another example of using redirects to support a prettier and easier-to- remember URL. Imagine how difficult it would be to type or remember http://www. google.com/tools/firefox/toolbar/FT3/intl/en/index.html. It's much easier to remember http://toolbar.google.com. The key is to find a way to have these simpler URLs without the redirects. Rather than forcing users to undergo an additional HTTP request, it would be better to avoid the redirect using Alias, mod_rewrite, DirectorySlash, and directly linking code, as described in the earlier section "Connecting Web Sites." Find ways to avoid redirects.

