Forum Moderators: phranque

Message Too Old, No Replies

WebmasterWorld Headers for Index Page

What that all about then?

         

Nick_W

3:20 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




HTTP/1.1 301 Moved Permanently
Date: Thu, 12 Jun 2003 15:14:14 GMT
Server: Apache/1.3.26 (Unix) FrontPage/5.0.2.2510
Location: [webmasterworld.com...]
Connection: close
Content-Type: text/html; charset=iso-8859-1


I was just hoping to get an insight into how to control cache whilst allowing image caching and css etc so I looked at the headers sent by WebmasterWorld

What's that 301 and why do there appear to be no cache control headers?

It's clearly somthing to techy for me so perhaps someone can put me straight?

Many thanks!

Nick

takagi

4:02 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I cannot reproduce your result.

I went to Server Header Check [webmasterworld.com] and entered:

http://www.webmasterworld.com

clicked the submit button and this is the result I got:

HTTP/1.1 200 OK
Date: Thu, 12 Jun 2003 15:56:49 GMT
Server: Apache/1.3.26 (Unix) FrontPage/5.0.2.2510
Cache-Control: max-age=0
Pragma: no-cache
X-Powered-By: BestBBS v3.045
Connection: close
Content-Type: text/html

and a similar result for

http://www.webmasterworld.com/index.htm

[edited by: takagi at 4:05 pm (utc) on June 12, 2003]

Nick_W

4:04 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, I did it with lynx:

lynx -head http://www.webmasterworld.com/

On my machine (on a test site) and it gave back all the headers I send with PHP.

Could it be the difference between sending with PHP or sending with .htaccess?

Nick

DrDoc

9:14 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP headers will be sent after the headers sent by the server. So, it's probably better to configure the headers in httpd.conf or .htaccess

drbrain

9:23 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would want the headers for a page that returned a 200 response, 301 is a redirect that points you to the new page (specified by Location:). run lynx -head on the URL in the Location: header.

No matter when you send the headers, they always come before the body.

(In MozillaFirebird you can install the Live HTTP Headers extension and view them in Page Info).