mrdoob/glsl-sandbox — comment on commit 30c6083fabab627c6b504dd4a7d304271a79df64
File:  line 0
By jfontan:

The problem comes from the way I choose to refer to each effect. Instead of using the original way of using hashes (it always loaded the same page and used the hash link as the input) I started using paths. Doing this will change the route of not only the effect page but also any of the relative resources it loads. As an example if the effect is in http://domain/1/1 and I have a resource included that is "js/something.js", it will be loaded from http://domain/1/1/js/something.js. This file for sure will be cached but it wont be useful for another effect, like http:/domain/2/1, as that file will be loaded from http://domain/2/1/js/something.js and will be seen as a different file by the browser.

As I told before the main problem was me using paths instead of hash links or even standard parameters so the effects all hang from the same path. In fact is a bit stupid doing this that way as the effect html is not modified in any way and is the js that loads the effect from http://domain/items/1/1.

I'll try to move the way this works to use hash links like the standalone version and add a fallback method that redirects old url path style to the new links so both static and server versions work the same.