6 Ways To Refresh a Webpage Using Javascript

6 Ways To Refresh a Webpage Using Javascript

1. Windows API

1. Windows API

window.location.reload( )

2. Document API

document.location.reload( )

3. Refresh Using onClick Method 

<button  type="button" onClick="window.location.reload()">  Page Refresh on Button Click </button>

4. Using SetTimeout() 

setTimeout ( ( ) => { document.location.reload( ) ; }, 1000 )

5. History API 

5. History API 

history.go( )

6. Meta Tags 

6. Meta Tags 

<meta http-equiv="refresh" content="30">