Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17647

Re: ajax request with no response

From JJ <jaejunks@glegooilma-swapit.com>
Newsgroups comp.lang.javascript
Subject Re: ajax request with no response
Date 2012-12-10 04:17 +0000
Organization A noiseless patient Spider
Message-ID <XnsA12573AE046F3jaejunksglegooilma@0.0.0.23> (permalink)
References <67WdnSfJBNQHTV7NnZ2dnUVZ_uGdnZ2d@westnet.com.au> <ka0lb7$32i$1@news.albasani.net>

Show all headers | View raw


Stefan Weiss <krewecherl@gmail.com> wrote:
> If it's an XHR request, there will be no navigation, and you will stay
> on the original page. The server can redirect to another location, but
> most XHR implementations just transparently follow the redirect and
> use whatever the redirect target sends as responseText/responseXml.
> (There may be some restrictions to that, especially if the redirect
> target is not from the same origin. I have never tested that.)
> 
> If you do want to navigate away from the original page, don't let the
> server do the redirect. Let the server return the new location to your
> script (in whatever format you usually use to communicate with the
> server), and the script then sets location.href.
> 
> - stefan

I thought there's a HTTP request header that can disallow server to 
respond a 3xx status codes, but I've searched through the HTTP specs and 
don't find any. Did I overlooked something?

I could only found that a server should not redirect a POST method 
requests.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ajax request with no response Andrew Poulos <ap_prog@hotmail.com> - 2012-12-09 10:43 +1100
  Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-09 01:17 +0100
    Re: ajax request with no response JJ <jaejunks@glegooilma-swapit.com> - 2012-12-10 04:17 +0000
      Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 11:03 +0100
        Re: ajax request with no response JJ <jaejunks@glegooilma-swapit.com> - 2012-12-11 11:06 +0000
  Re: ajax request with no response Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-09 19:51 +0100
    Re: ajax request with no response Andrew Poulos <ap_prog@hotmail.com> - 2012-12-10 08:17 +1100
      Re: ajax request with no response Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 00:25 +0100
      Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 00:53 +0100

csiph-web