怎么保证刷新页面去新的页面后数据还在

如何保证刷新页面去新的页面后数据还在?htmlheadscriptfunction test(){div document.getElementBy

如何保证刷新页面去新的页面后数据还在?
<html>
<head>
<script>
  function test(){
   div =document.getElementById('add');
   newone=document.createElement('div');
   newone.innerHTML="如何保证刷新后新的页面这些还在";
   div.firstChild(newone);
    }
</script>
</head>
<div id="add">
</div>
<p onclick="test()"> 添加</p>
</html>