Sometimes URLs are very big. You know the kind:
The problem with long URLs and autocomplete is that the autocomplete window offers relatively little space to display a URL. In general, URLs get about half the size they do in the location field, pictured above. Traditionally, this can be dealt with in one of two ways, neither of which is ideal. First, the end of the URL can simply be truncated off:
The problem here is that two URLs that differ only at the end appear the same. The Get Involved and Partnerships sites look like they have the same URL. The other option is to truncate the URL in the middle:
This option isn’t so great, either, because a vital part of the URL is lost—the host. The host is the part of the URL that tells you what the main site is. For the Get Involved and Partnerships sites, the host is www.mozilla.com. For the Mozilla Licensing Policies site, the host is www.mozilla.org. This is useful information when scanning a list of URLs, but it’s often lost when we truncate URLs in the middle.
What is the ideal solution, then? I’ll illustrate with an example. Let’s say we have the following URL:
http://www.apple.com/downloads/macosx/development_tools/index_sp.html
If it can’t fit in the space allotted to it in the autocomplete window, the first part we want to chop off is ‘downloads’. The URL now looks like this:
http://www.apple.com/…/macosx/development_tools/index_sp.html
It’s much shorter! However, it also still gives us a pretty good idea where it leads to. The last part of the URL is still intact (index_sp.html) and the host is still intact (www.apple.com). If the window continues to get smaller, we need to continue to shrink the URL:
http://www.apple.com/…/development_tools/index_sp.html
http://www.apple.com/…/index_sp.html
Finally, if we need to shrink the URL even further, we simply truncate the middle:
http://www.app…index_sp.html
Hopefully, it won’t come down to this too often. Today I’m pleased to announce a new patch I’m working on that follows these rules. Here’s a screenshot of the same set of URLs pictured above, smartly truncated:
Yes, I know the window size is a little bigger than the windows above. I showed the worst cases in the first two pictures in order to illustrate the point. I haven’t filed a bug for this yet, but will update this post when I do. This is now known as Bug 507653.



Another thing that would be worth playing with is stripping of the scheme, at least for http://, since in many cases–like your screenshot–it’s just noise.
I agree with Stuart. You can even leave off the http://www. for most sites that don’t point to a subdomain without losing any significant information.