URL resolve method
Status: Inactive
Brought to you by:
nettrom
A URL resolve method (resolving URLs relative to
MTMUA.preHREF) should exist, there's two reasons:
1: It would enable tracking of relative URLs based on
the resulting absolute URL
2: It would mean one could resolve the relative URL
stored in the tracked item cookie and then load an
absolute URL in the target frame, making sure the
loading always works.
It could also mean that the menu would always use
correct absolute URLs instead of bastardized
"foo/../bar"-like URLs that may appear now due to
MTMUA.preHREF being included to all relative URLs.
Logged In: YES
user_id=141897
MTMCheckURL( ... , true) doesn't regard a URL with scheme
http:// or https:// followed by location.host[name] as a
local URL/relative URL. I suspect some users have absolute
URLs instead of relative due to the non-existence of support
for URLs with "../", so keep that in mind if questions arise.
Logged In: YES
user_id=141897
The method has been added as MTMBrowser.resolveURL() (==
MTMUA.resolveURL() in the code). It takes two arguments,
the URL to resolve as a string, and a true/false value
saying whether it should test the URL to be a local URL or
not. In the first case the return value is the resolved
URL, in the second it's true for all local URLs.
Usage of the function in the cookie loading function should
be added too.
Logged In: YES
user_id=141897
The usage of MTMUA.preHREF is still very much present.
Clean it up in a later release so that all URLs are resolved.
Logged In: YES
user_id=141897
MTMresolveURL() doesn't handle "./" in URLs. It's basically
a no-op, so it should be easy to add support for it, since
it resembles "../". See
http://www.treemenu.com/board/viewtopic.php?t=16&postdays=0&postorder=asc&start=15