redirect of Ajax call - how to check?

G

Grzegorz Smith

Hi everyone. Does anyone know is it possible to check if ajax call was
redirect? i mean I connect by Ajax to one URL but I'm redirected to other
url. Is there a way to check that my request was redirected? this situation
happen when some urls are only accesible when you are logged (i mean you
have session) and if you losed session you are usually redirect to other
page. But I don't know is it possible to check that my call was redirect.
For now wheatever my AJAX call was redirect or not i get status 200 (it's
OK). But for me it's not enough.
Gregor
 
V

VK

Grzegorz said:
Hi everyone. Does anyone know is it possible to check if ajax call was
redirect?

Client-side only - absolutely impossible.

As the ajaxoids implement same-domain security, a successfull redirect
means that there is a content-grabber on the server to commumicate with
other server. For your ajaxoid though it is an absolutely normal
same-domain call. It cannot know about any redirections unless
content-grabber will inform him (by say setting some response header).
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top