title: Sending data to server and then refreshing the page
body: <p>I want to send some data to server, and deal with that data in server, and finally apply that data by refreshing the page.</p>
  <p>I wrote my server-side script by node.js, and used http form to send the data.</p>
  <p>But I don't know how to send the data while maintaing my original page.</p>
  <p>Only methods I know is get/post and deal with it by app.get / app.post in node.js, like this.</p>
  <pre><code>app.get('/filtered.html',async function(req,res){
      let db = await getDBConnection();
      let rows = await db.all('select * from items');
      await db.close();
  
      var output=new Array();
      var id =  new Array();
      var query = url.parse(req.url,true).query;
  
      if(query.productFilter=='All'||query.productFilter==''){
          for(let i=0;i&lt;rows.length;i++){
              output.push(rows[i]['product_image']);
              id.push(rows[i]['product_id']);
          }   
      }else{
          for(let i=0;i&lt;rows.length;i++){        
              if(rows[i]['product_category']==query.productFilter){
                  output.push(rows[i]['product_image']);
                  id.push(rows[i]['product_id']);
              }
          }
      }
      
      var output_send = JSON.stringify(output);
      var id_send = JSON.stringify(id);
  
      res.render('index',{
          data: output_send,
          data2 : id_send
      });
  });
  </code></pre>
  <p>So once I send the data by submit button and try to refresh the page, I'm still in the page such as .../product/:id/?result=xxxx... (original page = ..../product/:id )</p>
  <p>Could you please teach me some measures to send data while maintaining original page? Thanks.</p>