make new page redirect use JS instead of headers