Chrome application redirection loop problem

Recently I tried to pack my game into chrome app. To enable offline playing in my game. When I did this there was problem with redirection to level editor.

Chrome communicated that there is redirection loop.

I checked my code of redirection and there was something like this:

window.href = '/editor/#load';

The problem was that href didn’t point to actual page so ‘/editor/index.html’ but only to folder for which webserver automatically served index.html file.

The same problem was with redirection from editor to game

window.href = '../#load';

Needed to be changed to:

window.href = '../index.html#load';

Everything started to work well after this changes. You can find game app here.


, , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: