Is it possible to redirect a web site from the server on an ajax request?
Eg.
- The website (www.myapp.com) makes an ajax request to the server.
- The server redirects to the same URL with a hash eg. http://www.myapp.com#page=main.
- Website is redirected to http://www.myapp.com#page=main.
I need to redirect it to the same url but with a hash.
Using window.location.href = http://www.myapp.com#page=main won’t work since it will just update the location with the hash.
Aeah, it is. You can use meta or javascript redirect. Just append following code into an ajax reponse & make sure that reponse is placed into actual page
or to refresh, return