5 Reasons Why You Should Perform Geolocation Testing
Tags: webdev, testing, beginners, javascript
Published: 2021-11-05 18:02:38

We all know the saying "It works on my machine". It's a good practice to take the testing beyond the "It works in my country" phase.

It may be dangerous to assume a website will work the same for everyone in the world.

Here are 5 reasons why you should perform Geolocation Testing.

## 1. Using jQuery? Your website might not work in China.
Many websites that are using jQuery tend to still load it from a Google CDN.

Wait. What's a CDN?

A content delivery network (CDN) refers to a geographically distributed group of servers which work together to provide fast delivery of Internet content.

This means that, instead of hosting the jQuery library on your own servers, you just fetch it from a URL, like this:

```
https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
```

And it seems these URLs cannot be accessed from China without a VPN.

That means your website won't work correctly, and you'll end up like `user151496`:

![google cdn china](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drwvznyvezna703jiwds.jpg)

Now, you don't have to be as dramatic as `user151496`: It's easier to just test instead of giving up on ever using a CDN.

But maybe you're not interested in the 989 million people that have access to internet in China.

## 2. Your Checkout page is probably breaking the law in Germany.

In Germany, it's mandatory for any Checkout section to have a Review step.

Which is nice, since it gives folks a chance to double-check before making the payment.

As with any law or regulation, not respecting it can lead to a crippling fine.

One of the many reasons we have `Frankfurt, Germany` as a Geolocation option in [Endtest](https://endtest.io).

![frankfurt germany geolocation testing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1p3sdraikwxtieg3f73k.jpg)


## 3. Online Betting or Gambling? It's illegal in some US states.

There are 9 states that have strict laws for Online Betting and Gambling: Arizona, Alabama, Hawaii, Idaho, Iowa, Louisiana, Montana, Nevada and Washington State

If your website offers anything resembling online gambling, you should make sure it doesn't work in those states. Unless you're willing to pay some fines or go to prison.

Remember, it's the responsibility of the website owner to restrict access.

This is why we offer `Seattle, US` as a Geolocation option in [Endtest](https://endtest.io).

![seattle us geolocation testing gambling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mxj8wrilqwebpq9wvec.jpg)

***For those of you who are outside the US or just really bad at Geography, the city of Seattle is in the State of Washington.***

## 4. Your GDPR hacks are probably messing up something.
Remember 2018? Everyone was going bonkers about GDPR.

And a lot of custom logic was added in websites and services to have a specific behaviour when being accessed from the European Union.

It's a good practice to check if those GDPR patches that you added in 2018 are still working as expected.

Don't forget about the GDPR fines, they are still a thing.

## 5. Some third party scripts just can't be trusted
If you navigate the dependency tree of all the modules and services your website is using, it really makes you consider the risks you inherit, not to mention the exposure to left-pad type issues.

We encountered a memorable situation with an [Endtest](https://endtest.io) customer and their website.

Their website was working perfectly fine for them in Netherlands, but it was literally causing the browser to freeze and crash when being accessed from a US machine.

Turns out that some third party module used by their website was going crazy when being accessed from the US.

And we're talking about freezing the Chrome browser on a Windows machine with `16 GB of RAM`.

That issue might have never been uncovered if they never accessed their own website from outside of Europe.


Originally published on the Endtest blog:

https://endtest.io/guides/blog/2021/11/05/5-Reasons-Why-You-Should-Perform-Geolocation-Testing/