changed js method for redirect to meta