How can I refresh a page with jQuery/Javascript?

It is very simple

Javascript :

<script type=”text/javascript”>
setTimeout(function(){
window.location.reload();
}, 5000);
</script>

Jquery :

$(‘#id’).click(function() {
location.reload();
});