I use these codes for refreshing a part of my page :
var container = document.getElementById(\"mainForm:table_1\");
var content = container.innerHTML;
contai
for first part of your question do this :
var container = document.getElementById("mainForm:table_1").parentNode;
var content = container.innerHTML
container.innerHTML= content;
and for second part of your question as @JITHIN PV said you must use history.js
you can easily use it like this :
var History = window.History;
History.enabled ;
History.pushState("object or string", "object or string", "object or string");