YahooArchive / boomerang

End user oriented web performance testing and beaconing

Home Page:http://lognormal.github.com/boomerang/doc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ajax api call with relative url

cyang05 opened this issue · comments

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.

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