More reliable JS redirection