Welcome Alert
windows and alerts 1996 still worksA dialog box that greets the visitor the moment the page loads.
In 2026: Works. It was considered friendly in 1996 and it is considered hostile now.
Where it came from: Netscape JavaScript 1.0, 1996. It was considered friendly at the time. MDN ↗
<script language="JavaScript">
alert("Welcome to my home page!\n\nPlease sign my guestbook before you leave!");
</script>
<!-- Or only on the visitor's first arrival, using a cookie -->
<script language="JavaScript">
try {
if (document.cookie.indexOf("seenwelcome=1") === -1) {
alert("Welcome to my home page!");
document.cookie = "seenwelcome=1; path=/; max-age=31536000";
}
} catch (e) { /* a sandboxed frame has no cookie access */ }
</script>