javascript - React to 303 status code in jquery ( Prevent from redirecting) -


when send requests server, 303 response come, followed requested response in combination 200 status code. funny thing see on developer console's network view. when checking statuscode , response of $.ajax() request, there response of second request, 200 http status code.

the problem seems second request being cached (though 200 status code), , need non-cachable. therefore i'd intervene forwarding process occurs http 303 status code. i'd jquery function check status code, send request explicit headers, tell server not cache response.

well, don't know how this, since (as mentioned above) jquery.ajax method respond forwarded request's response , status code (200).

can me?

edit

10.3.4 303 see other

the response request can found under different uri , should retrieved using method on resource. method exists allow output of post-activated script redirect user agent selected resource. new uri not substitute reference requested resource. 303 response must not cached, response second (redirected) request might cacheable.

maybe need somehow prevent user agent redirecting himself, can redirect?

or there way tell server/browser not cache second request client-side? or prevent redirecting request? or @ least modify second request before redirecting?

responses in 300 range meant transparent. afaik, web browsers don't expose of them javascript. thus, handling 303 not option.

have tried setting cache property false in ajaxsetup? append timestamp request, preventing browser caching response. can manually yourself. browser should match first request url 2nd response


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -