properly parse the fragment identifier in the JS/WebGL frontend; produce minimal JSON in the backend