Caroline Hermans
Caroline Hermans

Reputation: 391

My website is generating too many redirects errors in chrome. Why is this and how can I fix it?

I wrote a game and put it online, and at the end of the game, there is a "restart" button. Rather than dealing with resetting the game state, I have it reload the page. However, after a few times of doing this, I get this screen in chrome:

Redirect errors

The reload code I'm using is:

<img id="restart-button" class="pointer" src="./img/restart.png"  onclick="location.reload()"/>

I'm also doing quite a lot of preloading for the game, I have 46 image/audio files that I load in the cache at the start of the game.

My best guesses are:

  1. the "location.reload()" is actually loading it a ton of times

  2. it doesn't like the amount of stuff I'm asking it to cache and re-cache

Do I need to redo this with a simple init function? That'd be a huge pain based on the way I wrote the game. what's going on here?

The url of the game is http://secretmommymakeover.com/

Upvotes: 0

Views: 1285

Answers (1)

Kresimir Pendic
Kresimir Pendic

Reputation: 3614

Your site has DNS issue, not code related issues. That's good news for you :)

When I did dig A secretmommymakeover.com I get three IP addreses back, like this:

secretmommymakeover.com. 1725   IN  A   162.255.119.154
secretmommymakeover.com. 1724   IN  A   192.30.252.154
secretmommymakeover.com. 1724   IN  A   193.30.252.154

and that confuses the browser every n-th reload and tries to pull resourses or page from diff IP addresses...

Remove uncorrect IP address, and leave only correct one.

Also you have www subdomain redirect to and from naked domain name switched on, so try to switch if off if IP address didn't work.

enter image description here

Upvotes: 1

Related Questions