Home > Jquery > JQuery to Refresh the page for every 5 minutes

JQuery to Refresh the page for every 5 minutes


Hi

try this example to Refresh the page for every 5 minutes using JQuery :-

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript" src="jquery-latest.js"></script>   
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            setInterval("location.reload(true)", 300000);
        });   
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      I'll refresh every 5 minutes!
    </div>
    </form>
</body>
</html>

Hope this helps

Good Luck

Advertisements
Categories: Jquery
  1. November 2, 2011 at 8:47 pm

    Just what I needed to know! Thanks!

    • yasserzaid
      December 5, 2013 at 9:59 am

      @Mark : You are welcome

  2. Sarah
    November 12, 2013 at 1:23 pm

    Thanks a lot

    • yasserzaid
      December 5, 2013 at 9:59 am

      @Sarah : you are welcome

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: