Jump to content

Cache-Control HTTP Headers


psymonic

Recommended Posts

Hi all im new to this board, hopefully you will be able to help me out here. My question is what exactly does post-check and pre-check do, I used to know this but i forgot and was stupid enough to not comment my code. If anyone has a definite answer ill be thrilled to hear it because endless searchs on google just couldnt help me out this time.

 

Thanks Guys

Simon

Link to comment
Share on other sites

Thanks for replying thorpe, most sites dont use post-check or pre-check. Here is a site which mentions them but doesn't use them.

 

http://www.computec.ch/projekte/httprecon/?s=database&t=head_existing&f=cache-control

 

I think when post-check is set to 0 when you submit a form and then click back you are asked if you want to resubmit the form but when its set to 1 and you submit a form and click back, you go back to the previous page without the form being re submitted.

 

regards

 

I was either post-check or pre-check which does that but i think it was post-check, either way i cant remember at all what the other one does.

Link to comment
Share on other sites

It seems no one has, however i have a zend study guide and its used it there however it just says its use for caching, but it doesnt say what.

 

Here in a IE blog they are talking about it.

 

http://blogs.msdn.com/ie/archive/2006/06/01/613132.aspx

 

Also can someone please tell me what setting public and private do in cache-control headers.

 

Thanks

 

 

Link to comment
Share on other sites

Its not code its a HTTP Resonce from servers, take this very thread for example i got this responce

 

HTTP/1.x 200 OK

Date: Mon, 10 Nov 2008 16:42:35 GMT

Server: Apache/2.2.8 (EL)

Expires: Mon, 26 Jul 1997 05:00:00 GMT

Cache-Control: private

Pragma: no-cache

Last-Modified: Mon, 10 Nov 2008 16:42:35 GMT

Content-Encoding: gzip

Vary: Accept-Encoding

Keep-Alive: timeout=2, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/html; charset=ISO-8859-1

 

 

im asking what the "private" means in: Cache-Control: private

 

and what would happen if you replace private with public to give: Cache-Control: public

 

also I still need to know what: Cache-Control: post-check: 1, pre-check:1

 

would do.

 

Thanks

Link to comment
Share on other sites

Not sure what the private vs public is.

 

I am sure that post-check=1 is that after the page has posted it will check for a new version, where as pre-check=1 the moment you load up that page it checks for a new version.

 

I am not 100% on it, but that makes the most logical sense.

Link to comment
Share on other sites

post-check=1 is that after the page has posted it will check for a new version

 

by posted do u mean a form submitted and i though no-cache made it look for a new version of a page.

 

pre-check=1 the moment you load up that page it checks for a new version.

 

whats the point in looking for a new version if the page already has been loaded.

 

This is really confusing. But thanks for your reply.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.