1

I have the same ajax request firing from two locations:

$.post("/conversations", ... );

Fired from domain.com/chat, the request is sent to domain.com/conversations correctly.

Fired from domain.com/u/blah, the request is sent to domain.com/u/conversations incorrectly.

How do I get both to send to the former's destination?

Will Taylor
  • 1,994
  • 2
  • 23
  • 36
  • Help: http://stackoverflow.com/questions/4765740/relative-urls-in-ajax-requests . Had to change to `$.post("/conversations/", ... );` – Will Taylor Feb 09 '15 at 17:40
  • 1
    If the location is always the same use: `"//"+location.host+"/conversations"` – Mouser Feb 09 '15 at 17:51

0 Answers0