Refreshing a webpage

    技术2023-03-19  32

    1.Using the standard HTML Mewta tag 'Refresh'. This tag specifies a delay before the browserautomatically reloads the page. The delay is specified in seconds. You can specify a URL also to reload. If you do not specify a URL, it will relaod the same page after the interval.

    <head>

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

    </head> 2. Response.AppendHeader("Refresh", "10; URL=http://www.dotnetspider.com")

    3.If you are only trying to refresh your page once, this is something better handled on the client side. E.g.: 

     <script> 

    function refresh() {     window.location.reload(); } </script> <button οnclick='refresh();'>Refresh the page once</button>

    最新回复(0)