Can we access server side database using pure html5 (i.e. without using PHP, ASP.... or any other backend language) ? We can use web sql database, but that is stored on client side. I need to access server side database (maybe mysql or any other).
1 Answer
HTML5 is just a static document, so it can't access a server, but you can use JavaScript for that. No, you can not access a server-side MySQL database from a web browser without server side scripts, since MySQL doesn't provide a http-interface directly.
If you don't want to learn a common server side language, you could use Node.js to be able to use JavaScript on the server side.
3 Comments
Arjun Bora
Hi Jonas, thank you for your reply. Though I did not go through in details of node.js, but I got to know that it is a tool which can be run on linux terminal and it can be used only on linux. I am working on windows. I understood your point, but I am exploring the capabilities of html5. Could you tell me any other way to access/insert into server database using html5 only...
Jonas
@Arjun: No, HTML5 contains no support at all for accessing server side databases. HTML5 is a totally different thing.
Aaron John Sabu
Can I link Node.js with HTML somehow? As in my Node.js code does a database query now and it works but saves the result by logging into a file. Instead, can I send this processed data to HTML?