Well if it's just for Googlebot that's not so bad.

HTTP caching with users and browsers is a @#%&'n nightmare.

If your tango code can capture the "If-Modified-Since" date value, then you could be in business. You just return that value as your Last- Modified and give a 304 status - and not return any body contents.

Also if Google is supplying a "If-None-Match" value (unlikely in this case), then return that as your ETag value.

I'd experiment first.

Keep in mind your tango code still has to interact with Googlebot, so there will always be some degree of a performance hit.

ASP.NET does have a nice HTTP caching component built right into the system, it's just a simple matter of setting some attributes on the Page directives - but still, it can really get in the way sometimes.

Hope that helps.

Scott,




On Aug-22-2008, at 12:33 PM, WebDude wrote:

Thanks, Scott,

Yeah, I thought it was going to be complicated ;-/ I actually was looking at ASP and PHP code to see if I could write something in Witango that would
kind of do the same thing.

I was looking at this from a Googlebot point of view. When Gbot comes, if the requested page hasn't been modified since the last request it won't
crawl the page. Google recommends that you use this...

"You should configure your server to return this response (called the
If-Modified-Since HTTP header) when a page hasn't changed since the last
time the requestor asked for it. This saves you bandwidth and overhead
because your server can tell Googlebot that a page hasn't changed since the
last time it was crawled."

'Dude


-----Original Message-----
From: Scott Cadillac [mailto:[EMAIL PROTECTED]
Sent: Friday, August 22, 2008 9:51 AM
To: [email protected]
Subject: Re: Witango-Talk: 304 last-modified

Hey Dude,

Unfortunately HTTP caching takes a lot more consideration than just globally
setting a custom HTTP response header.

When you set a custom header for caching purposes, this process is entirely dependent on receiving some specific request HTTP header properties (i.e., If-Modified-Since and/or If-None-Match), in order to conditionally set a
corresponding expiry date, an ETag number and a
304 response (for the subsequent responses), as opposed to the custom 200 response (on the first response). And depending on the version of tango you
are running - you may not have access to these HTTP properties.

In addition, HTTP caching is managed by matching the entire URL of the file in question, this includes the argument names and values, so if your GET
arguments are changing, then your caching is overridden. POST requests
generally always override cache checks as well.

And of course it should be mentioned that although browsers and proxies do adhere to the HTTP standards, these applications and devices are sometimes
unpredictable as to "when" they implement cache rules.

I've built systems with HTTP caching, and I hope I can save you some time by giving you some advice - don't bother. The headache, unpredictability and limited results is usually not worth it. There'll be times where you can easily waste hours chasing your code in circles just to discover that all the bugs and weird behavior is the result of something happening off the
server (where you have no control).

I would recommend you pursue methods for caching whatever essential data you need in memory on the Server to save on performance issues - or check out
load balancing. Or possibly an appliance of some kind that handles the
caching outside of your server.

And please note, your tango code example is for deliberately turning "off"
caching.

I hope this helps, good luck.

Scott,




On Aug-22-2008, at 10:55 AM, WebDude wrote:

Hi All,

I am a bit confused as to how to implement a caching scheme in which I
can show whether or not a page has been updated or not. This is for a
forum that stores the last update by date. I would like to change the
response http to show the last-modified date if possible.
Unfortunately, I am a novice on http headers and would like some help
on how to implement this. If I set the expiry to

<@ASSIGN Local$httpHeader VALUE="Content-Type: text/html<@CRLF>Cache-
Control: no-cache, max-age=0, must-revalidate,proxy
revalidate<@CRLF>Pragma: no-
cache<@CRLF><@USERREFERENCECOOKIE><@CRLF>">

Will this generat what I need for the request? I am looking for the
reponse to be something like this...

HTTP/1.0 200 OK
Server: Microsoft-IIS/5.0
Content-Location: http://www.xyz.taf
Date: Fri, 22 Aug 2008 18:22:39 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 020 Aug 2008 13:30:23 GMT
ETag: "801395163ec21:8a9"
Content-Length: 751

And I am confused as to the ETag.

Can I set this globally for all tafs? or would that really take a
performance hit?

Can someone shed some light on this, please?

Thanks!



______________________________________________________________________
__ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to