Forum Moderators: open
Can anyone explain this to me in english ;), does that mean you put a tag somewhere in the header or....
Another question (maybe related, depending on answer to first question)...example:
A Site's Head tags are written then called by using an include file with the titles, keywords..etc been dynamically generated. So if a page has some content amended the header include is not "modified"..
will this affect the above question in any way?
Sorry if this doesn't make sense...but I know what I'm trying to say really :)
Suzy
I think you are confusing some things here.
When a web-server is asked for a file, is responds with a protocol header followed by the file. If the file is a HTML file, there is also a header within the HTML, but that is another header.
The HTTP header for content freshness is the Last-Modified header, but it has to be set by the web-server. You cannot change it by setting a META element in your file.
If your file is a static HTML file, any change to it should change to the Last-Modified HTTP header, because the header is normally set from the last modified time of the file being served.
If your page is served by a script, you have to set the header yourself.
René.
I knew I was getting confused, but thats cleared things...
If your page is served by a script, you have to set the header yourself.
don't quite understand, this bit though...how?
Jim thanks I've had a look not sure I understand yet but I'll try!
I'm only a humble web-designer ;)
Thanks again
Suzy
If your page is served by a script, you have to set the header yourself.don't quite understand, this bit though...how?
Web-pages can be made with HTML files you edit with some editor. These are static pages.
It is also possible to have web-pages made on the fly by a program or script. This is how many database driven sites are made. These are dynamic pages.
"Pages served by a script" means dynamic pages.
Maybe the programmer in me got the upper hand there :)
René.
My fault my question wasn't clear.
I meant that the was the appropriate bit for me..sorry
I've now read more of that link Jim gave me and apart from my head being sore I've discovered that none of my pages are being cached..
part of the message I got:
Expires -
Cache-Control - private
Last-Modified -
ETag -
Set-Cookie aspsessionidgqqgqdaq=[deleted]
path=/
Content-Length 8.3K (8517)
Server Microsoft-IIS/5.0
--------------------------------------------
This object will be considered stale, because it doesn't have any freshness information assigned. It doesn't have a validator present. It won't be cached by proxies, because it has a Cache-Control: private header. This object requests that a Cookie be set; this makes it and other pages affected automatically stale; clients must check them upon every request.
which I presume is bad for site performance and bandwidth (not a problem yet..small site)
are unnecessarily affected.
Why is a cookie being set I haven't set it?
Obviously it would be better to cache images and other static content and not cache (or set a time period for) a news page where content could change daily
However I'm reading the why..but not the how, I've come across something about telnet, is this the only way to set individual preferences...
or am I now completely out of my depth, and does it matter anyway ;)
[thinks] Why did I get into this anyway [/thinks]
Suzy
:)
According to the test results you quoted, ASP is creating the cookie for tracking sessions. I'm not at all conversant with ASP, but I suspect there is a way to configure it to not use cookies or sessions if you don't need them.
At the very least, you should be able to enable caching of your images if not your dynamically-generated pages. Have a look around in your ASP and IIS documentation for cache-control-related stuff.
Jim
I do not know anything whatsoever about ASP, so I can't give you any precise hints, but you need these headers set:
Expires -
Cache-Control - private
Last-Modified -
You need something like this:
Expires: Fri, 13 Dec 2002 02:09:30 GMT
Cache-Control: max-age=86400
Last-Modified: Thu, 12 Dec 2002 02:09:30 GMT
The dates obviously have to be adjusted to fit your needs and the age of your data.
You must find somebody ASP savvy to tell you how to set these headers in ASP.
René.