10

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
  • 1
    Just a heads up, if you will allow javascript to make direct queries to your database, any user can make those queries as well. So in essence your entire database is publicly accesible! Commented May 24, 2011 at 7:08

1 Answer 1

11

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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...
@Arjun: No, HTML5 contains no support at all for accessing server side databases. HTML5 is a totally different thing.
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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.