Ethernet Shield WebServer Difficulties

I'm playing with modifying the basic web server example to control some relays. The problem I'm running into seems to be a browser cache issue. I've found multiple solutions, but none of them seem to function for me. When a form button is clicked, it writes to this window.location. The arduino takes action based on that value. Unfortunately, the refresh of the web page results in reloading that cached value and it performs the operation again. If I close the browser window and reopen it, the window.location value goes away, but once I click a button again the value persists with each refresh. Does someone have a solution for this problem? Basically I need a way to clear the window.location value or variable when the page refreshes.

/*
  Web Server

 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield.

 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)

 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe

 */

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(10, 10, 45, 4);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);
int buttonpin = 9;
String readString; // We will be using strings to keep track of things.
String emptyString = "    ";

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
  pinMode(buttonpin, OUTPUT);
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        if (readString.length() < 120) {
          readString += c;
        } 
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<hmtl>");
          client.println("window.location.href = window.location.href.replace('');");
          client.println("</head>");
          client.println("<title>");    
          client.println("ARDUINO + ETHERNET Page");
          client.println("</title>");
          client.println("<body bgcolor=black>");
          client.println("<font color=white>");
          client.println("<center>");
          client.println("<p>");
          client.println("<table border=0 width=200>");
          client.println("<tr>");
          client.println("<td align=center>");
          client.println("<font color = turquoise size=10>");
          client.println("00 <font color = turquoise size=6>deg F");
          client.println("</td>");
          client.println("</tr>");
          client.println("</table>");
          client.println("<p>");
          client.println("<FORM>");
          client.println("<INPUT type=button value=CYCLE&nbsp;SWITCH style=font-size:30px onClick=window.location='/?onecycle\'><p>");
          client.println("<INPUT type=button value=OPEN&nbsp;DOOR style=font-size:30px onClick=window.location='/?open\'><p>");
          client.println("<INPUT type=button value=CLOSE&nbsp;DOOR style=font-size:30px onClick=window.location='/?close\'><p>");
          client.println("<INPUT type=button value=OPEN&nbsp;FOR&nbsp;CAT style=font-size:30px onClick=window.location='/?cat\'>");
          client.println("</FORM>");
          client.println("<table border=1 width=200>");
          client.println("<tr>");
          client.println("<td align=center>");
          client.println("<font color=white size=3>");
          client.println("The Door Is");
          client.println("</td>");
          client.println("</tr>");
          client.println("<tr>");
          client.println("<td align=center>");
          client.println("<font color=white size=7>");
          client.println("OPEN");
          client.println("</td>");
          client.println("</tr>");
          client.println("</table>");
          client.println("</center>");
          client.println("</font>");
          client.println("</body>");
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disconnected");
    Serial.println(readString); 
      if(readString.indexOf("?onecycle") >0)     // these are the snippets the Arduino is watching for.
          {
                PushTheButton();
          }
      if(readString.indexOf("?open") >0)     // these are the snippets the Arduino is watching for.
          {
                PushTheButton();
                delay(200);
                PushTheButton();
          }
      if(readString.indexOf("?close") >0)     // these are the snippets the Arduino is watching for.
          {
                PushTheButton();
                delay(2000);
                PushTheButton();
          }          
    readString = emptyString;

    
  }
}
void PushTheButton()
{
  digitalWrite(buttonpin, HIGH);  
  delay(200);              
  digitalWrite(buttonpin, LOW); 
}

Unfortunately, the refresh of the web page results in reloading that cached value and it performs the operation again.

Tell the server to not refresh the page using the status: 204 code and an iframe like in the below code.

//zoomkat 10-6-13
//simple button GET with iframe code
//open serial monitor to see what the arduino receives
//use the ' instead of " in html ilnes 
//address will look like http://192.168.1.102:84/ when submited
//for use with W5100 based ethernet shields

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

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //ethernet shield mac address
byte ip[] = { 192, 168, 1, 102 }; // arduino IP in lan
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(84); //server port

String readString; 

//////////////////////

void setup(){

  pinMode(4, OUTPUT); //pin selected to control
  //start Ethernet
  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  server.begin();

  //enable serial data print 
  Serial.begin(9600); 
  Serial.println("servertest1"); // so I can keep track of what is loaded
}

void loop(){
  // Create a client connection
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();

        //read char by char HTTP request
        if (readString.length() < 100) {

          //store characters to string 
          readString += c; 
          //Serial.print(c);
        } 

        //if HTTP request has ended
        if (c == '\n') {

          ///////////////
          Serial.println(readString); //print to serial monitor for debuging 

          //now output HTML data header
             if(readString.indexOf('?') >=0) { //don't send new page
               client.println("HTTP/1.1 204 Zoomkat\r\n\r\n");
             }
             else {
          client.println("HTTP/1.1 200 OK"); //send new page
          client.println("Content-Type: text/html");
          client.println();

          client.println("<HTML>");
          client.println("<HEAD>");
          client.println("<TITLE>Arduino GET test page</TITLE>");
          client.println("</HEAD>");
          client.println("<BODY>");

          client.println("<H1>Zoomkat's simple Arduino button</H1>");
          
          client.println("<a href='/?on1' target='inlineframe'>ON</a>"); 
          client.println("<a href='/?off' target='inlineframe'>OFF</a>"); 

          client.println("<IFRAME name=inlineframe style='display:none'>");          
          client.println("</IFRAME>");

          client.println("</BODY>");
          client.println("</HTML>");
             }

          delay(1);
          //stopping client
          client.stop();

          ///////////////////// control arduino pin
          if(readString.indexOf("on1") >0)//checks for on
          {
            digitalWrite(4, HIGH);    // set pin 4 high
            Serial.println("Led On");
          }
          if(readString.indexOf("off") >0)//checks for off
          {
            digitalWrite(4, LOW);    // set pin 4 low
            Serial.println("Led Off");
          }
          //clearing string for next read
          readString="";

        }
      }
    }
  }
}

.