I have erlang web application with cowboy and angular.js.
I started my application, opened browser in '/' and got main.html with <input> and <button>. When i pressed to the button i send http POST request to the server to the /join/username with angular $http, got this POST request at the server and send redirect to the browser:
{ok, Req4} = cowboy_req:reply(303, [{"Location", <<"/chat.html">>}], <<"">>, Req3)
{:ok, req4, State}
Redirect response headers:
HTTP/1.1 303 See Other
connection: keep-alive
server: Cowboy
date: Thu, 19 Sep 2013 14:36:01 GMT
content-length: 0
Location: /chat.html
Cache-Control: no-store
After sending redirect, i got "GET" request from browser with "/chat.html" path, it's ok. I read chat.html and send back to the browser, but browser doesn't render it and url doesn't change in browser. I see chat.html 200 in browser console.
Why browser doesn't render new page - chat.html?
UPD 1.
if i type /join/username in browser by hand it redirects normally. Why?
Thank you.