You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Improve URL auto complete ~Subdirectories~
Typing my.opera/community/forums in the address bar and pressing Ctrl+Enter currently leads to http://www.my.opera/community/forums.com. I would like to see a smarter algorithm implemented, that understands that subdirectories come after the TLD.For the record, Firefox 3.6 does it the way it should be done, but only if there's no / at the end. (E.g. it won't add a TLD to my.opera/community/forums/, but it will add it correctly to my.opera/community/forums).
[ Tweedo Monitor - Deluxe Website & Service Monitoring ]
Some segments from: http://www.w3.org/Addressing/URL/uri-spec.html
Originally posted by Tim Berners-Lee:
Reserved characters
The path in the URI has a significance defined by the particular scheme. Typically it is used to encode a name in a given name space, or an algorithm for accessing an object. In either case, the encoding may use those characters allowed by the BNF syntax, or hexadecimal encoding of other characters.
[...]
Hierarchical forms
The slash ("/", ASCII 2F hex) character is reserved for the delimiting of substrings whose relationship is hierarchical. This enables partial forms of the URI. Substrings consisting of single or double dots ("." or "..") are similarly reserved.
The significance of the slash between two segments is that the segment of the path to the left is more significant than the segment of the path to the right. ("Significance" in this case refers solely to closeness to the root of the hierarchical structure and makes no value judgement!)
[...]
HTTP
The HTTP protocol specifies that the path is handled transparently by those who handle URLs, except for the servers which de-reference them. The path is passed by the client to the server with any request, but is not otherwise understood by the client.
The host details are not passed on to the client when the URL is an http URL which refers to the server in question. In this case the string sent starts with the slash which follows the host details. However, when an http server is being used as a gateway (or "proxy") then the entire URI, whether HTTP or some other scheme, is passed on the HTTP command line.The search part, if present, is sent as part of the HTTP command, and may in this respect be treated as part of the path.No fragmentid part of a WWW URI (the hash sign and following) is sent with the request. Spaces and control characters in URLs must be escaped for transmission in HTTP, as must other disallowed characters.
[...]
reserved
= | ; | / | # | ? | : | space
[...]
httpaddress
h t t p : / / hostport [ / path ] [ ? search ]
Even if / did occur within the hostaddress, I'd say the suggestion still stands strong, simply because of the rarity of it occurring. The neat Ctrl+Enter trick is just a helpful feature, not a standard.

PS: also it's a realls short ... one indexof, and three stringcopys

[ Tweedo Monitor - Deluxe Website & Service Monitoring ]