HaCos
HaCos

Reputation: 185

Analysis of HTTP header

Hello I want to analyze & understand at first place and then optimize the HTTP header responses of my site. What I get when I fetch as Google from webmasters is:

HTTP/1.1 200 OK

Date: Fri, 26 Oct 2012 17:34:36 GMT // The date and time that the message was sent

Server: Apache // A name for the server

P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" // P3P Does an e-commerse store needs this?

ETag: c4241ffd9627342f5f6f8a4af8cc22ed // Identifies a specific version of a resource

Content-Encoding: gzip // The type of encoding used on the data

X-Content-Encoded-By: Joomla! 1.5 // This is obviously generated by Joomla, there wont be any issue if I just remove it, right?

Expires: Mon, 1 Jan 2001 00:00:00 GMT // Gives the date/time after which the response is considered stale: Since the date is set is already expired, this creates any conflicts?

Cache-Control: post-check=0, pre-check=0 // This means site is not cached? or what?

Pragma: no-cache // any idea?

Set-Cookie: 5d962cb89e7c3329f024e48072fcb9fe=9qdp2q2fk3hdddqev02a9vpqt0; path=/ // Why do I need to set cookie for any page?

Last-Modified: Fri, 26 Oct 2012 17:34:37 GMT

X-Powered-By: PleskLin // Can this be removed?

Cache-Control: max-age=0, must-revalidate // There are 2 cache-controls, this needs to be fixed right? which one is preffected? max-age=0, must-revalidate? post-check=0, pre-check=0?

Keep-Alive: timeout=3, max=100 // Whats that?

Connection: Keep-Alive

Transfer-Encoding: chunked // This shouldnt be deflate or gzip ??

Content-Type: text/html

Upvotes: 1

Views: 4402

Answers (1)

Vibha Sanskrityayan
Vibha Sanskrityayan

Reputation: 1985

  • post-check Defines an interval in seconds after which an entity must be checked for freshness. The check may happen after the user is shown the resource but ensures that on the next roundtrip the cached copy will be up-to-date. http://www.rdlt.com/cache-control-post-check-pre-check.html
  • pre-check Defines an interval in seconds after which an entity must be checked for freshness prior to showing the user the resource.
  • Pragma: no-cache header field is an HTTP/1.0 header intended for use in requests. It is a means for the browser to tell the server and any intermediate caches that it wants a fresh version of the resource, not for the server to tell the browser not to cache the resource. Some user agents do pay attention to this header in responses, but the HTTP/1.1 RFC specifically warns against relying on this behavior.
  • Set-Cookie: When the user browses the same website in the future, the data stored in the cookie can be retrieved by the website to notify the website of the user's previous activity.[1] Cookies were designed to be a reliable mechanism for websites to remember the state of the website or activity the user had taken in the past. This can include clicking particular buttons, logging in, or a record of which pages were visited by the user even months or years ago.
  • X-Powered-By: specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application.This comes under common non-standard response headers and can be removed.
  • Keep-Alive It is meant to reduce the number of connections for a website. Instead of creating a new connection for each image/css/javascript in a webpage many requests will be made re-using the same connection.
  • Transfer-Encoding: The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.

Upvotes: 2

Related Questions