PHP page returning HTTP/1.1 200 OK

Asked

Viewed 1,556 times

0

After SQL query and return data using JSON, using the browser Firefox is written the following on the screen:

0

HTTP/1.1 200 OK
Date: Sun, 12 Jun 2016 22:52:42 GMT
Server: Apache
X-Powered-By: PHP/5.3.28
Keep-Alive: timeout=5
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

41
{"AQUI RETORNA O MEU":"JSON E ACABA"}

Using the Chrome Mobile on a smartphone this HTTP data does not appear, returning only JSON as desired.

Test page: www.megaprotecaoveicular.com.br/mobile/data.php

Thanks for your help.

  • 1

    Without the code that sends this message, there’s no way we can know what happens.

  • Guy who sucks this 0

  • jbueno, I will edit by adding the code, but before it worked normally with the same code. And of all that it returns, only JSON is what I printed.

  • Opa! In the Chrome Mobile browser only returned JSON, which was the intended one. In Firefox for desktop it continues showing the other data. I conclude then that the "error" is not in the code... Just for your knowledge, you have any idea why it happens? '-'

1 answer

2


Headlines of server and should not be presented on the side client.

HTTP / 1.1 200 OK

It means the server is responding using HTTP protocol version 1.1. 200 is the code used when everything is ok.

Content-Length: 0

The content size (in this case 0 bytes)

Keep-Alive: timeout = 5, max = 100

How long the connection will remain open.

Connection: Keep-Alive

Informs that the connection will remain open

Content-Type: text/plain

What kind MIME content (HTML, in this case: text/html)

Documentation here (RFC 2616)

More understandable information with 23 reference links: HTTP Headers

Reason for appearing on client side (browser): outdated version of Mozilla Firefox. The error was reported by several users in the year 2011 and fixed in browser version 9, or at least stopped presenting the problem since then.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.