Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to reload the webpage if user make no activity

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 506
    Comment on it

    Hello Reader's! If you are looking for functionality for reloading a web page only when user makes no activity for a while, Then you can use the ajax technology for making the html tag refresh. Lets see the example below:-

            <script src=""></script>
            <title>Ajax Page</title>
            setInterval(function () { autoloadpage(); }, 60000); // it will call the function autoload() after each one minute.
            function autoloadpage() {
                    url: "URL of the destination page",
                    type: "POST",
                    success: function(data) {
                        $("div#wrapper").html(data); // here the wrapper is main div
        <div id="wrapper">
        contents will be changed automatically. 

    Here we have target the $("div#wrapper").html(data); html tag. So this part will get refresh

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: