Skip to main content
edited body; edited title
Source Link
Michel Keijzers
  • 13k
  • 7
  • 42
  • 59

My ESP8266 Web Serverweb server is Only Displaying Textonly displaying text, Even After Ensuring Content Typeeven after ensuring content type is text/html - Please HelpHTML

So I just got my two ESP8266/ESP-12E WiFi development boards in the mail as I am trying to set up a few home automation devices in my house. I'veI've gotten much further than I thought I would today, considering this is my first foray into working with circuits that involve microprocessors/WiFi, but I've run into a problem that I can't find a solution to myself. Forgive me if there is another question similar to this, but I could not find it and this seems like the best place to ask.

I am using a tutorial/template program that Rui Santos from Random Nerd Tutorials was kind enough to create ( https://randomnerdtutorials.com/esp8266-web-server/ ), and although we have (as far as I can tell) identical boards, operating systems and Arduino code, I keep getting an HTML page that is text only, with none of the CSS or HTML elements showing. It should look like this:

expected outcome

However, I am getting a page that looks like this:

outcome

His serial monitor is giving this response:

his serial monitor

My serial monitor is giving me this response:

my serial monitor

I've tried putting client.println("Content-type:text/html");client.println("Content-type:text/html"); in a few places to see if it would help display the page, but to no avail. Any help with getting this little program/website running would be greatly appreciated.

Thanks for your time!

My ESP8266 Web Server is Only Displaying Text, Even After Ensuring Content Type is text/html - Please Help

So I just got my two ESP8266/ESP-12E WiFi development boards in the mail as I am trying to set up a few home automation devices in my house. I've gotten much further than I thought I would today, considering this is my first foray into working with circuits that involve microprocessors/WiFi, but I've run into a problem that I can't find a solution to myself. Forgive me if there is another question similar to this, but I could not find it and this seems like the best place to ask.

I am using a tutorial/template program that Rui Santos from Random Nerd Tutorials was kind enough to create ( https://randomnerdtutorials.com/esp8266-web-server/ ), and although we have (as far as I can tell) identical boards, operating systems and Arduino code, I keep getting an HTML page that is text only, with none of the CSS or HTML elements showing. It should look like this:

expected outcome

However, I am getting a page that looks like this:

outcome

His serial monitor is giving this response:

his serial monitor

My serial monitor is giving me this response:

my serial monitor

I've tried putting client.println("Content-type:text/html"); in a few places to see if it would help display the page, but to no avail. Any help with getting this little program/website running would be greatly appreciated.

Thanks for your time!

My ESP8266 web server is only displaying text, even after ensuring content type is text/HTML

So I just got my two ESP8266/ESP-12E WiFi development boards in the mail as I am trying to set up a few home automation devices in my house. I've gotten much further than I thought I would today, considering this is my first foray into working with circuits that involve microprocessors/WiFi, but I've run into a problem that I can't find a solution to myself. Forgive me if there is another question similar to this, but I could not find it and this seems like the best place to ask.

I am using a tutorial/template program that Rui Santos from Random Nerd Tutorials was kind enough to create ( https://randomnerdtutorials.com/esp8266-web-server/ ), and although we have (as far as I can tell) identical boards, operating systems and Arduino code, I keep getting an HTML page that is text only, with none of the CSS or HTML elements showing. It should look like this:

expected outcome

However, I am getting a page that looks like this:

outcome

His serial monitor is giving this response:

his serial monitor

My serial monitor is giving me this response:

my serial monitor

I've tried putting client.println("Content-type:text/html"); in a few places to see if it would help display the page, but to no avail. Any help with getting this little program/website running would be greatly appreciated.

Thanks for your time!

Source Link

My ESP8266 Web Server is Only Displaying Text, Even After Ensuring Content Type is text/html - Please Help

So I just got my two ESP8266/ESP-12E WiFi development boards in the mail as I am trying to set up a few home automation devices in my house. I've gotten much further than I thought I would today, considering this is my first foray into working with circuits that involve microprocessors/WiFi, but I've run into a problem that I can't find a solution to myself. Forgive me if there is another question similar to this, but I could not find it and this seems like the best place to ask.

I am using a tutorial/template program that Rui Santos from Random Nerd Tutorials was kind enough to create ( https://randomnerdtutorials.com/esp8266-web-server/ ), and although we have (as far as I can tell) identical boards, operating systems and Arduino code, I keep getting an HTML page that is text only, with none of the CSS or HTML elements showing. It should look like this:

expected outcome

However, I am getting a page that looks like this:

outcome

His serial monitor is giving this response:

his serial monitor

My serial monitor is giving me this response:

my serial monitor

I've tried putting client.println("Content-type:text/html"); in a few places to see if it would help display the page, but to no avail. Any help with getting this little program/website running would be greatly appreciated.

Thanks for your time!