Sometimes use the whole page automatically refresh, in the front end can be implemented in two ways, the first is the use of META tags to send HTTP headers for automatic refresh, the second is the use of JavaScript function delay for automatic refresh.
1. Using Meta tags to automate page refreshes
Meta tags can have a lot of features, location is placed in the HTML code
<http-equiv= "Refresh" content= "5">
http-equiv= "Refresh" function is to tell the browser to automatically refresh the page or redirect to a new URL
2, using JavaScript to achieve automatic page refresh
JavaScript in the window.location has a method of refreshing the page reload (), the method is encapsulated into a function, and then delay execution can be, refresh the page and then execute, so that the implementation of automatic refresh
1 <Scripttype= "Text/javascript">2 functionMyrefresh () {3 window.location.reload ();4 }5 SetTimeout ('Myrefresh ()', the); //5s after performing function Refresh page6 </Script>
This will automatically refresh the page
Implementation of automatic page refresh