yes-www

I’ve been using blanket rule of no-www this past years and that is coming to an end.

Leaking WordPress cookies to every single sites hosted on this domain is probably not the best idea. Not that there’s any problem but just in case. Also no cookie to worry about for uploads and other static sites. Or maybe not if WordPress sets the cookie properly (it seems to be mostly does).

I was thinking of moving everything but for some single-use domains like 0paste.com it’s probably fine with no-www.

The other benefit is I can point the bare domain to a cheap server just for redirection and properly set CNAME for www subdomain instead of relying Cloudflare’s top-level CNAME function (which apparently also called “ANAME”?).

I’ve switched the redirection for www to 302 (temporary redirect) from 301 (permanent redirect) a while ago so hopefully no browser still cache the 301.

HTML template

Apparently I made over 50 drafts for this blog years ago. This is one of them. And the content doesn’t seem to be too bad so might as well finish this post.

I occasionally write some HTML. There are some essential things needed for a valid page.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title goes here</title>
<!-- additional meta goes here or wherever -->
</head>
<body>
Content goes here.
</body>
</html>

The doctype is just the basic HTML 5 doctype.

Followed by setting the language of the page. Usually English. Apparently it’s recommended by W3C. Although I sometimes forgot about it.

Then of course head, followed right away by charset. UTF-8 is the best set we currently have and so it’s set there. Without this tag, the page might be rendered in some other set.

I’m not sure if setting X-UA-Compatible is still relevant anymore but IE11 is still here so might as well set it. Or remove if IE compatibility isn’t needed.

Viewport setting is unfortunately essential so the page isn’t zoomed out when viewed using mobile device. Just don’t disable scaling as that’s rude (unless it’s game or something).

The rest are just usual HTML stuff.