1

I'm running a site (in a development environment) that has http://172.31.129.188:8888/pp/ as its base url.

From http://172.31.129.188:8888/pp/pingpong I have this ajax call:

$.post('pingpong/check/',
    function (data) {
        alert(data);
    }
);

The problem is that while Firefox and Explorer call http://172.31.129.188:8888/pp/pingpong/check (as I want), Chrome makes a call to http://172.31.129.188:8888/pp/pingpong/pingpong/check. I've tried various combinations (like adding and removing the slashes etc) but still Chrome seems to have a different approach.

Can anyone help to unify the behavior? Thanks

2 Answers 2

4

In my opinion, Chrome is behaving correctly and IE/Firefox are not. URLs are either absolute with a domain, relative to the domain-base if they start with a slash (/) or relative to the current location.

If you access b/c from /a/b that should be /a/b/b/c not /a/b/c as the b is relative to the current location, it should not match part of the location and continue from there. If you need to use relative URLs try calling check/ to see if that behaves appropriately.

Sign up to request clarification or add additional context in comments.

Comments

1

Make the call to /pp/pingpong/pingpong/check

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.