arduino web server

I want to build a web server and read sensor values from a web page. I am using a arduino due board and a rak 410 wifi adapter. Problem is after publishing the web page explorer i con doesnt stop spining means waiting for more info from server. and doesnt send ajax requests to server.

Once I enter adress to explorer it sends requests (GET etc ) to arduino I can read those from serial hen I can send HTML to explorer it shows the page but doesnt stop to lading and doesnt send ajax requests.

CAn someone check below code and say me what is the mistake

thanks

void loop()
{

/// if there is connection set rak 410 wifi transmitter to send and recieve

while (Serial2.available()) { // Serial2 data available to read
char c = Serial2.read(); // read 1 byte (character) from Serial2
HTTP_req += c; //

}

if (HTTP_req.indexOf ("_")>-1 & transparent==false)

{
Serial2.print(“at+easy_txrx\r\n”);
Serial.println(“transparent moda gecildi !!!”);
transparent=true;
}
// rak 410 is ready

k= HTTP_req.indexOf(“G”); // if GET has been recieved from browser
l=HTTP_req.indexOf(“E”);
if (l-k==1)
{
Serial2.println(""); // send the web page
Serial2.println("");
Serial2.println("");
Serial2.println(“Arduino Web Page”);
Serial2.println("");
Serial2.println("");
Serial2.println("");
Serial2.println(“

Arduino AJAX Switch Status

”);
Serial2.println(
“<p id=“switch_txt”>Switch state: Not requested…

”);
Serial2.println("<button type=“button”
onclick=“GetSwitchState()”>Get Switch State");
Serial2.println("");
Serial2.println("");
Serial2.print("");
Serial2.flush();

}

// display received HTTP request on serial port
Serial.print(HTTP_req);
HTTP_req="";

}