How to update HTML content without using redirect after a REST request?

I have been told issuing a redirect('/') for API requests is not RESTful. I have been doing it like so:

app.delete('/items/:id', urlencodedParser, (req, res) => {
    let index = parseInt(;
    items.splice(index, 1);


I now know this is wrong. But then what do I need to do to update the content on the HTML web page without refreshing the page manually?

Read more here:

Content Attribution

This content was originally published by SpiderWebbs at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: