Reputation: 997
I am trying to catch redirect response of asp.net from client-side by javascript/jquery but I could not manage it.
My target is catching redirect url and modifying it. Are there any way to do it?
More Details: I'm converting an application to ajax style. I'm loading pages by jquery.load method so when I post a form it is loading out of the container. I know it is not a good way, but it is temprorarily best way for me.
Upvotes: 1
Views: 286
Reputation: 507
There's no way of catching redirect info with JavaScript. Clientside code is not even loaded when browser receives HTTP 301 or HTTP 302 headers, it automaticaly sends GET request to new URL.
Upvotes: 2