Monday, February 21, 2011

How do you change your apparent country of origin to test a site?

I want to be able to set my country of origin - does this involve testing through a proxy, or is there something that can be set else where?

From stackoverflow
  • I would use TOR for this purpose. That way you are sure you are hitting the site from a different country.

    Abyss Knight : Only issue with this is I don't think you get to choose the destination node. TOR is a great system though.
    tvanfosson : This only works, under Abyss Knight's condition, if the site is doing detection via IP. If it is doing language-based detection it won't help as TOR will just pass those HTTP headers on.
  • Depends on what do you want to test against. If it is a GeoIP system, you'd need to get yourself a proxy in another location or otherwise use a different network. If it is the HTTP content negotiation headers you can change them in the browser configuration.

  • How you do it depends on the operating system and browser and what you are testing.

    If you are testing non-HTML content that runs in the browser (eg flash), then with IE, you must change your machine's location as IE picks it up from there. With Firefox, browse to about:config, accept the "Here be dragons" warning and edit the general.useragent.locale value.

    If you are testing what version of a page is returned based on local, then you need to specify the lanuge (in Firefox, tools -> options menu -> content tab -> choose button in languages section and add the correct country code)

  • I'm assuming you're using the IP to check the country. If you're testing internally then it may be possible to get a setup where the both the testing machine and the server to be tested are behind the same NAT. In this case just set your IP manually to an IP for whatever country you want to test, and connect to the server. So long as both of you are behind the same NAT it should see you as whatever IP you set.

0 comments:

Post a Comment