title: How to avoid re-sending data on refresh in Node.js with Express
body: <p>First of all, I want to apologyze for my english.</p>
  
  <p>I have a Node.js aplication using Express and Jade. My main page has a form, wich allows people to register. I send the data via POST. I have a handler like this:</p>
  
  <pre><code>app.post('/userCreate', user.create);
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>exports.create = function(req, res){
    //creates the user in the database
    res.render('./game/main');  //goes to the main game page
  }
  </code></pre>
  
  <p>My problem is that when people registers, and I render the main page, in the URL appears "localhost:3000/userCreate". So, if I press F5, all data is sended again via POST, because it's catching '/userCreate' again, and it tries to create another User.</p>
  
  <p>I think an option could be change the URL after creating a user, but I realized that neither 'render' nor 'redirect' methods changes it.</p>
  
  <p>I've been reading about post-redirect-get pattern, but I don't know how to do a get without a form, I mean, via javascript instead of HTML.</p>