6 JS window.location fallbacks

On some servers the header request can be ignored, so have JS as a
fallback