Can I check the exact URL within an XMLHTTPRequest?

G

Gabriella

Hi,

My website has a feature where users can insert a list of URLs, and we
will save the URLs for them.

The problem is that I need to make sure the URL they inserted in the
exact one!
E.g.: Let's say the user inserted http://www.exampleURL.com - I need
to verify whether it's
http://www.exampleURL.com OR
http://exampleURL.com OR
http://www.exampleURL.com/home.asp
The user does not know the exact URL, but since it is important for me
know, I thought I will be able to perform an XMLHttpRequest to the
URL, and somehow find out the exact URL.

Is there a way to figure it out?

Thanks,
Gabi
 
D

David Mark

Hi,

My website has a feature where users can insert a list of URLs, and we
will save the URLs for them.

The problem is that I need to make sure the URL they inserted in the
exact one!
E.g.: Let's say the user insertedhttp://www.exampleURL.com- I need
to verify whether it'shttp://www.exampleURL.comORhttp://exampleURL.comORhttp://www.exampleURL.com/home.asp
The user does not know the exact URL, but since it is important for me

And why is that important to you? I put it to you that it is
thoroughly unimportant if you are creating a database of links. In
the above case, you would store:

http://www.exampleURL.com/

Note the added slash, which eliminates an extra redirect. It doesn't
matter where that URI redirects today as it may change tomorrow. If
the site is dynamic, it may change every time you hit it.
know, I thought I will be able to perform an XMLHttpRequest to the
URL, and somehow find out the exact URL.

You can't. Redirects are transparent to client requests.
 
T

Thomas 'PointedEars' Lahn

Randy said:
David Mark said the following on 10/12/2007 5:47 AM:

They are?

Yes, they are *with XHR*. This has been discussed before here, where
I was in the position of doing the testing and providing the answer.
Does the W3's link validator go back and forth from the server
or is it done client side?

The validation is all server-side of course.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top