Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if a url is valid

Status
Not open for further replies.

robertaborg

Programmer
May 2, 2009
2
MT
Hi,

I m getting results from a search engine. I am doing some processing on these results and I need to check if the results(i.e the urls are valid for eg that the website is still there etc).

Do you know of any thing which I can use in javascript to do so.

10x
 
What's wrong with http request to other domains?

Server-side avaliability doesn't always mean client-side avaliability ...

Cheers,
Dian
 
Hi

Dian said:
What's wrong with http request to other domains?
Well, let us see where I can connect from this thread's page :
Code:
[blue]>>> (new XMLHttpRequest()).open('GET','[URL unfurl="true"]http://tek-tips.com/')[/URL][/blue]
[blue]>>> (new XMLHttpRequest()).open('GET','[URL unfurl="true"]http://google.com/')[/URL][/blue]
[COLOR=white red] x [/color] [green][b][Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "[URL unfurl="true"]http://tek-tips.com/viewthread.cfm?qid=1548404&page=1[/URL] Line: 65"][/b][/green]

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top