/    Sign up×
Community /Pin to ProfileBookmark

Does anyone else use Tiny URL to force W3C compliance of unruly URLs?

So, do you ever get a site where you have to link to an external site or location and the link you have been given – which is out of your control – is full of characters and strings that are not W3C compliant, so you replace it with a Tiny URL?

OR

do you ever use it to shrink static unruly long winded URLs?

to post a comment
Full-stack Developer

19 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 11.2010 — Does URL encoding not solve the problem?
Copy linkTweet thisAlerts:
@etardauthorMar 11.2010 — sure... so I recode hand encode some of these long URLs

or I can C&P them into Tiny URL and get a nice, short, clean W3C compliant URL in return

easy decision for me ?
Copy linkTweet thisAlerts:
@etardauthorMar 11.2010 — hmm.. lots of reading, I will browse some of it and see the high points

but just FYI, I have never had an issue using this method. Never a bad link, never a broken link, never not W3C compliant
Copy linkTweet thisAlerts:
@ScriptageMar 11.2010 — Well it isn't W3C compliant is it? It violates WCAG: http://www.w3.org/TR/WCAG/#navigation-mechanisms.
Copy linkTweet thisAlerts:
@etardauthorMar 11.2010 — I think I see what you mean

are you referring to the section "2.4.4 Link Purpose (In Context):" and section "2.4.9 Link Purpose (Link Only):"

if so, I still think it is good for these 3 reasons:

  • 1. http://validator.w3.org/ verifies the page - if there is an issue with it, they should flag it as they flag the long unruly URL as bad, and when you change to a Tiny URL they pass it fine. Point is, if an issue is there, they should flag it.


  • 2. 2.4.4 says "The purpose of each link can be determined from the link text alone or from the link text" - well, if you were to leave the links as is, and maybe hand recode them to use W3c complaint code, you still have no idea what they do, where they go and their purpose.. so as is or converted, you still can't determine "the purpose of each link"


  • 3. 2.4.9 says "A mechanism is available to allow the purpose of each link to be identified" - well, put the URL back into Tiny URL and you will get the URL as it was, so there is the "mechanism" they ask for
  • Copy linkTweet thisAlerts:
    @ScriptageMar 11.2010 — The link URI is obfuscated so to my understanding it would violate 'Link purpose and understanding': http://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-link.html. A link could have the text of 'List of books' a URI of 'www.tinyurl.com/12345' and an actual URI reference of 'www.somexxxsite.com'.

    That's my interpretation, although, I could be wrong.
    Copy linkTweet thisAlerts:
    @etardauthorMar 11.2010 — seems a but ambiguous at best. for example, look at the link you gave..

    ww.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-link.html

    you and I can extrapolate what the link "likely" means. but, can others who are not developers? So, THAT url is obfuscated to some, and clear to others. Who decides?

    Not only that, take a look at a link like this... (it is a fake link I am using as an example, but similar to real life)

    extranet.securefreedom.com/abcde/shopping/ShoppingCart_LoadPage.asp?OrderType=C&ext=1&RepID=1234

    can anyone tell what this is? no. you can kind of guess. maybe. so, is the 'Link purpose and understanding' clear by looking at that link any more than looking at a Tiny URL?

    I say no.
    Copy linkTweet thisAlerts:
    @svidgenMar 11.2010 — What the ...

    tinyurl's just [I]redirect[/I] to the URL you're trying to avoid linking to. You're still linking to the same thing, you're just adding a layer of redirection. And, unless this is for the benefit of user readability (if the user has to copy/paste the URL for any reason), it's a wasted redirect and unnecessary latency.

    End of story.
    Copy linkTweet thisAlerts:
    @ScriptageMar 11.2010 — you and I can extrapolate what the link "likely" means. but, can others who are not developers? So, THAT url is obfuscated to some, and clear to others. Who decides?[/QUOTE]

    The Tiny URL masks the target URI and therefore the user cannot make an informed decision as to whether or not they want to activate the link. At worst it violates WCAG, at best it's bad usability but either way it should be avoided.
    Copy linkTweet thisAlerts:
    @etardauthorMar 11.2010 — What the ...

    tinyurl's just [I]redirect[/I] to the URL you're trying to avoid linking to. You're still linking to the same thing, you're just adding a layer of redirection. And, unless this is for the benefit of user readability (if the user has to copy/paste the URL for any reason), it's a wasted redirect and unnecessary latency.

    End of story.[/QUOTE]


    well of course that is what it does??? you missed the point. the point was to allow a page with an unruly, long, not compliant external URLS in it to pass W3C compliance. That is all, no more, no less. your only valid concern is the latency.. but in this day an age, a lost second or 2 in a redirect means little and could be attributed to anything.

    The Tiny URL masks the target URI and therefore the user cannot make an informed decision as to whether or not they want to activate the link. At worst it violates WCAG, at best it's bad usability but either way it should be avoided.[/QUOTE]

    come on?? who EVER looks at a URL before they click it and "makes an informed decision"? ha ha ha on a trusted site you accessed on purpose, you just click the links and go. you do it all the time. we all do. AND, even if you knew how to look and see in your browser where the link was going, you would not even know as it is so unruly and garbled and would mean nothing to you even if you could/did see the link you were about to!

    so far, these are Red Herring reasons
    Copy linkTweet thisAlerts:
    @ScriptageMar 11.2010 — well of course that is what it does??? you missed the point. the point was to allow a page with an unruly, long, not compliant external URLS in it to pass W3C compliance. [/QUOTE]

    You can either manually alter the URI, or use one of the programming languages I detailed in my first post to do it programatically with ease.

    come on?? who EVER looks at a URL before they click it and "makes an informed decision"? ha ha ha on a trusted site you accessed on purpose, you just click the links and go. you do it all the time. we all do. AND, even if you knew how to look and see in your browser where the link was going, you would not even know as it is so unruly and garbled and would mean nothing to you even if you could/did see the link you were about to!
    [/QUOTE]


    There is a status bar in the browser window to show people exactly where they are going when they click on a link. You can no longer update the status bar using JS (by default) for this reason.
    Copy linkTweet thisAlerts:
    @svidgenMar 11.2010 — well of course that is what it does??? you missed the point. the point was to allow a page with an unruly, long, not compliant external URLS in it to pass W3C compliance. That is all, no more, no less. your only valid concern is the latency.. but in this day an age, a lost second or 2 in a redirect means little and could be attributed to anything.[/QUOTE]
    Asinine! Write your [I]own[/I] redirect if you really can't fathom fixing the URLs yourself! At least you'll have the benefits of avoiding dependence on external services and the ability to track outbound clicks then ...

    But seriously ... unless you're goal is to track outbound clicks, redirection is the (most) wrong(est) thing you can do.
    Copy linkTweet thisAlerts:
    @etardauthorMar 11.2010 — Asinine! Write your [I]own[/I] redirect if you really can't fathom fixing the URLs yourself! [/QUOTE]

    easy tiger... no reason to get that upset

    At least you'll have the benefits of avoiding dependence on external services and the ability to track outbound clicks then ... [/QUOTE]

    yes, dependance is a good point.

    But seriously ... unless you're goal is to track outbound clicks, redirection is the (most) wrong(est) thing you can do.[/QUOTE]

    I have been 100% clear [U]the goal[/U] was W3C compliance of unruly long urls tat can't pass W3C.


    though we do not totally agree, I am glad I bought this up as it is interesting to see peoples thoughts
    Copy linkTweet thisAlerts:
    @svidgenMar 11.2010 — I have been 100% clear the goal was W3C compliance of unruly long urls tat can't pass W3C.[/QUOTE]
    And for that goal, redirection is [I]not[/I] an appropriate solution. Relative compliance is merely a side-effect.
    Copy linkTweet thisAlerts:
    @etardauthorMar 11.2010 — Assuming I bought into the (1) dependancy issue of using the 3rd party redirect and (2) the added latency of said redirect - as these are the only 2 points raised I buy into at this stage - if you tell your client W3C compliance is offered, and yet have to use external URLs they provide that cannot pass W3C compliance, re-handcoding said URLs 1x1 is the only way to do it?

    As I see it, writing your own redirect method will not help the W3C issue as once you put the link into the page, pow.. no more compliance. A redirect method would not fix the W3C issue.
    Copy linkTweet thisAlerts:
    @svidgenMar 11.2010 — ... re-handcoding said URLs 1x1 is the only way to do it?[/QUOTE]

    No. You use a URL encoding function. For PHP, I think it would be urlencode(). I'm pretty sure someone mentioned that already--credit to whoever that was ...
    Copy linkTweet thisAlerts:
    @ScriptageMar 11.2010 — yet have to use external URLs they provide that cannot pass W3C compliance, re-handcoding said URLs 1x1 is the only way to do it?[/quote]

    For the last time you can do this with a simple server side program in any language.

    As I see it, writing your own redirect method will not help the W3C issue as once you put the link into the page, pow.. no more compliance. A redirect method would not fix the W3C issue[/quote]

    someprogram.php?page=blah is compliant.
    Copy linkTweet thisAlerts:
    @etardauthorMar 11.2010 — sorry man, I have not ever used said server sided URL encoding function in php, so not sure how it works. Get the general idea, but never done it so will look into it.
    ×

    Success!

    Help @etard spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.2,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,
    )...