cheeaun/life

Support non-root paths

umazalakain opened this issue · 4 comments

As far as I understand, the XHR is made to the root of the domain. What if, lets say, my index.html resides in some subpath?

As a default behavior, it would be nice to get the current url, strip the last segment of it and append the life or config file paths. That said, it would also be nice to give the user the chance of specifying (in index.html I guess) where to load the resources from.

Just curious, any reasons why you need the config/Life files to be placed separately from index.html ?

Uh, no one in particular but since some support for configs not residing in / would be needed, adding an option for specifying any custom path doesn't seem bad.

Currently it's not really in the / as in root of the domain. Where ever index.html resides (root, subdomains, subfolders), that's where the config/Life files would be requested via XHR as long as they are in the same directory as index.html.

Uh, okay, didn't know that! I guess I'll close this issue then!