[ethernet] updating pin status on webpage without refresh

hey guys.. i'm a newbie using arduino mega and ethernet shield..i use the ethernet shield as a webserver i'm trying to read a pin status (digital)..and write it on the web pages (if pin status is high, then write "ON" on the webpage..else write"OFF") my problem is the status pin ("ON" or "OFF") on the webpage does'nt change until i refresh the webpage i want the webpage load the current status without pressing the refresh button what should i do with my codes? thanks

Since you didn’t supply any code for evaluation, it is hard to provide info on what your problem might be. Could be the caching settings in your browser.

You must add

in the section of your HTML file. This should cause the browser to refresh the page every 30 seconds, it also has a serious drawback as the [BACK] button will eventually go through all refreshed pages …

You can also use it to redirect after a certain delay (for a HTML splash screen)

of an instant redirect

Below is an example of a simple metta-refresh page.

// for W5100 ethernet shield
// the IP address will be dependent on your local network/router
// port 80 is default for HTTP, but can be changed as needed
// use IP address like http://192.168.1.102/ in your brouser

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 102 };
Server server(80);

void setup()
{
  // start the server
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  // listen for incoming clients
  Client client = server.available();
  if (client) {
     while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // see if HTTP request has ended with blank line
        if (c == '\n') {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          
          //meta-refresh page every 2 seconds
          client.print("<HEAD>");
          client.print("<meta http-equiv=\"refresh\" content=\"2\">");
          client.print("<TITLE />Zoomkat's meta-refresh test</title>");
          client.print("</head>");
                    
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("
");
            }
          break;
           }
        }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}

ok it works thanks..really appreciate that :D