YahooArchive / boomerang

End user oriented web performance testing and beaconing
http://lognormal.github.com/boomerang/doc/
Other
1.18k stars 447 forks source link

Ajax api call with relative url #48

Open cyang05 opened 9 years ago

cyang05 commented 9 years ago

Boomerang is overriding url logic of jquery ajax call. We use relative url to load static json file from the server with jquery ajax. Let's say we have a json file with path: http://www.example.com/json/my.json var r_url = 'json/my.json' $.ajax({ url: r_url, type: "GET", async: false, timeout: 10000, // 10 seconds success: function() { }, error: function() { });

Suppose current page is http://www.example.com/some/page The actual url of the api becomes http://www.example.com/some/page/json/my.json

We don't have this problem without boomerang library. After investigating, we found that boomerang is making the ajax api call not jquery. I think boomerang is overriding the relative url logic of jquery and cause the problem.

Thanks.

bluesmoon commented 9 years ago

This github project is obsolete. Please have a look at https://github.com/lognormal/boomerang/ for the latest boomerang code.