Menu

#9 URL resolve method

open
nobody
None
5
2001-12-09
2001-12-09
Morten Wang
No

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.

Discussion

  • Morten Wang

    Morten Wang - 2002-01-27

    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.

     
  • Morten Wang

    Morten Wang - 2002-02-12

    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.

     
  • Morten Wang

    Morten Wang - 2002-06-02

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.