Coder Social home page Coder Social logo

Comments (9)

bluesmoon avatar bluesmoon commented on May 27, 2024

Shouldn't r_url be set to /json/my.json to make it an absolute path? Without that it would be relative to the current page.

from boomerang.

nicjansma avatar nicjansma commented on May 27, 2024

@cyang05 I couldn't get your test case to work (without Boomerang):

Try this: http://dev.nicj.net/auto-xhr/

The page has your code, as above. The URL it's passing to $.ajax() is auto-xhr/test.json, which you're saying should go to http://dev.nicj.net/auto-xhr/test.json.

I agree with Philip, that a relative URL without a leading slash such as auto-xhr/test.json would be relative to the current path http://dev.nicj.net/auto-xhr, and thus should be http://dev.nicj.net/auto-xhr/auto-xhr/test.json.

Is this only in a specific browser you're seeing this behavior?

What if you switch to a leading /?

from boomerang.

nicjansma avatar nicjansma commented on May 27, 2024

@cyang05 Are you by chance using an Angular app or something that uses history pushState? I may see an issue, where the "relative url" for an angular app is / while the method we use to cleanup the URL in plugins/auto_xhr.js might consider the history state URL (/some/page)

from boomerang.

cyang05 avatar cyang05 commented on May 27, 2024

We have a base tag inside our head element:
""
I think all relative url should be relative to host root.

from boomerang.

cyang05 avatar cyang05 commented on May 27, 2024

And I think JQuery takes the base tag into consideration. I just tested your code with base tag, it worked.

And yes, we are using angular framework.

from boomerang.

nicjansma avatar nicjansma commented on May 27, 2024

@cyang05 I updated the repro at http://dev.nicj.net/auto-xhr, but I still can't seem to reproduce the problem.

I also tried on a site that has Angular with a base href set, but couldn't reproduce there either.

Can you share the URL you're seeing the issue on?

Also, can you let me know what browser + OS you've found this on?

from boomerang.

cyang05 avatar cyang05 commented on May 27, 2024

Someone loads this js file in our repo:
https://c.go-mpulse.net/boomerang/QB2NF-KYJFR-YPPM5-YJF6X-LAMRA
After comment it out, our website goes back to normal. The code was never in production. We found the problem on our local testing server.
Since boomerang is in that js file, we speculate it's caused by boomerang and apparently it's not.

Thanks for your time, I really appreciate it.

from boomerang.

bluesmoon avatar bluesmoon commented on May 27, 2024

It looks like you're using mPulse, which is the commercial service that uses boomerang. The mPulse team is already in communication with your developers regarding this issue.

from boomerang.

nicjansma avatar nicjansma commented on May 27, 2024

FYI, we have resolved this issue in mPulse and will be back-porting this to boomerang.js

from boomerang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.