I want to know how to return to the previous page using a twig template no javascript, if it's possible.
Any help would be great.
In twig you can access:
app.request.headers.get('referer')
Hope this help
if you have need same route use
<a href="{{ path(app.request.get('_route')) }}">Same page</a>