I started learning HTML5 / CSS3 / JavaScript / Node.js and had no experience with HTML4, not to mention web applications. So this may be a stupid question, but in any case, I could not see the answer when searching on the Internet, since all the examples that I read, both on the Internet and in books, were considered written in HTML4, here.
In Node.js, when you send a response header to a client, you should write the following code example:
var http = require('http'); http.createServer(function(req, res){ res.writeHead(200, {'Content-Type':'text/html'}); res.write(some_data); res.end(); });
However, in HTML5 you don’t need to write the header {'Content-Type':'text/html'} , right? Can I delete the res.writeHead line in the node application file? I know that some browsers still do not support HTML5, but if possible, I want to make my code suitable only for HTML5 / CSS3.
Also, when I finish creating a web application and publish it, which way should I go when I deal with a browser that still does not support HTML5 / CSS3 (let's say old IE).
1) Publish it anyway, even if some content there crashes and looks bad.
2) Completely block users who use the browser because of the security perspective, and suggest that they use a different browser if it is feasible (I do not know, but I suspect that I can access the information of the client’s browser and the deal with him, respectively, with using javascript ... right?)
I don’t want my code to be suitable for all browsers, since I want to publish it as a hobby and create a beautiful website using HTML5 / CSS3, spending as little time as possible.
Thanks.