Bart,
It isn't required, but many libraries that have AJAX functions set a
special 'HTTP_X_REQUESTED_WITH' header, although in your case it appears
that it may not be present.
This is some PHP code I've used to detect XMLHttpRequest
if ($_SERVER['HTTP_X_REQUESTED_WITH']) {
if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
return TRUE;
}
}
return FALSE;
I realize this doesn't answer your timeout question but might help.
-- Brad
> Is there any way to detect when a request is an XMLHttpRequest versus
> a regular HttpRequest?
>
> There appears to be nothing in Request Info that can be used to
> differentiate.
>
> The specific problem occurs when a session times out on a "Web 2.0"/
> ajax page. Links that use XMLHttpRequest are being properly redirected
> to 'app.timeout', but the result is placed inside the container
> originally meant for the XMLHttpRequest result, including double
> headers, etc.
>
> How does one properly handle app.timeout and other redirections in a
> Web 2.0 environment where the expected result is a chunk of html but
> the result is a fully rendered page?
>
> --
> Bart
>
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/