HTML Form HTTP Extensions

In 2016, it is not possible to properly interact with a RESTful API endpoint in a browser without using JavaScript.

Users make changes to server state in HTML through form elements and subsequent HTTP requests. Unfortunately, HTML currently only supports GET and POST form methods. This forces pages to either use JS or poor HTTP semantics. I understand the value of modern JS, but the complexity is not always required for a simple page, form, or application.

"Good design is as little design as possible." - Dieter Rams

I'd love to be able to use something like this for simple applications to provide better HTTP semantics without JS:

<form action="//example.com/comment/351" method="PUT">
  <textarea name="content">
    My edited comment
  </textarea>
  <button type="submit">Update</button>
</form>

This could be progressively enhanced with JavaScript, but could also work just fine without it.

The draft for implementing this functionality has been in place since 2014, and a call to browser implementors went out in early 2015, but this feature hasn't gotten much traction. It seems we're all more interested in Service Workers and Web Components than modernizing HTML.

If you'd like to be able to interact with additional HTTP verbs from vanilla HTML, I'd encourage you to visit and vote for the browser vendor issues to get this implemented (Firefox, Chromium, Edge).

Check out my other pages tagged "blog".