Return empty string in beforeunload instead of false