Check for broken links

Check for broken links

  

i'm developing a Resources library and links to online resources are part of that but there is always the issue of broken links. Is there some way of setting an expiry date or running a timer that could loop through each link and check if the link is broken - then set a boolean flag if it is broken?

Debra

The problem I see is 'check if the link is broken' - exactly how would you do that?  Most web sites, as long as the domain part is right, will supply some sort of 'page not found' message.  Since every site does this differently, what code could you write that would detect this?  If you were able to do this, setting a Boolean would be trivial.

For example, if you go to http://www.outsystems.com/xyz/, a non-existent page, you get a response that looks like many of the other pages on the site.  Using program code, how would you determine that the page doesn't exist?  And you can't go by the 404 error - most sites don't give you that either.

Curt


Thanks Curt.

I was actually hoping someone had already solved this. Fortunately we haven't suggested this to our client yet. It may just be a case of setting an expiry date and having a dashboard in their back office that indicates when a link needs checking that it still works - not ideal but it may have to do for now.

Debra


Hi Debra,

As Curt mentioned, the issue will be how exactly to know if a link is really broken... Although it may seem simple, it's quite complex to get that correct and things keep changing all the time.

Imho you should go for a third party solution - there are several tools available, developed only with the goal of finding broken links. Do a search and choose what fits your needs - it might not be worth trying to integrate it with OutSystems...