res.writeHead(301, "<!DOCTYPE html>" +
"<html lang='en' dir='ltr'>" +
"<head>" +
"<met charset='utf-8'>" +
"<title>Hola Mundo</title>" +
"</head>" +
"<body>" +
"<script type='text/javascript'>alert('DOne')</script>" +
"</body>" + "</html>", { "Location": "http://localhost:8086/uploadform" });
Instead of displaying the alert message first as expected, it is redirecting directly to the given link. I would like the alert message to be shown before being redirected.