How to reload current page in Express.js?

express, node.js

Solution

I'd just like to add that in the version 4.x of Express you can use

res.redirect('back');

to automatically redirect back to the page the request came from. This is the equivilant of

res.redirect(req.get('referer'));

that is mentioned in Peter Lyons answer

See also: http://expressjs.com/api.html#res.redirect

Problem

I'm current in `/id/1234` page, and click a `POST /add` button, after that I want to reload `/id/1234` in Experss.js:`res.redirect(**How to get /id/1234 dynamicly, since I will be in /id/1235, /id/1236 page do a same POST /add action?**)` Thanks.

Original source