That’s good. Few suggestions:
1. The Pragma line should have a space after “Pragma:” 2. You didn’t include the HTTP/1.1 200 OK<@CRLF> in the first line - before the content type. My example used tags to build that line 3. The @PURGERESULTS isn’t needed for the assignment (perhaps for another reason?) 4. If you [might] use cookies, include @SETCOOKIES 5. If you are on >= 5.0, you should use the request scope – not local. Robert From: WebDude [mailto:[email protected]] Sent: Wednesday, October 03, 2012 8:26 AM To: [email protected] Subject: RE: TeraScript-Talk: OT somewhat - IE9 and cache How about something like this... (no line breaks)... <@purgeresults><@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>"> _____ From: Robert Shubert [mailto:[email protected]] Sent: Tuesday, October 02, 2012 7:09 PM To: [email protected] Subject: RE: TeraScript-Talk: OT somewhat - IE9 and cache META headers (in the body of the document) are not the same thing as the HTTP headers which are part of the protocol. For example, cache servers will only, typically, look at the HTTP headers. In general I think HTTP headers are preferred over META headers. Also, HTTP headers MUST be used for non-html content. I prefer setting the HTTP headers for my purposes. I think the general rule of thumb is to ‘do what works’ meaning that different servers and browsers may react differently to these various commands. Robert From: WebDude [mailto:[email protected]] Sent: Tuesday, October 02, 2012 10:41 AM To: [email protected] Subject: RE: TeraScript-Talk: OT somewhat - IE9 and cache Hi Robert, Thanks for the response. This appears only on a very select few taf files. Still trying to figure out why some files and not others. Most notably there is one in which we are having trouble. We were able to clear the IIS7 output cache and it now appears to be working correctly. However, in the future, couldn't we just add this in the header?... <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="expires"CONTENT="0"> _____ From: Robert Shubert [mailto:[email protected]] Sent: Tuesday, October 02, 2012 9:09 AM To: [email protected] Subject: RE: TeraScript-Talk: OT somewhat - IE9 and cache Typically this is done by setting some HTTP headers in the response. You can set headers in IIS which would then apply to all files that are requested. Alternatively, you could set the headers in TeraScript – which would then apply to all pages returned by TeraScript (TAFs) but not JS, CSS and images. To set headers in TS, set the httpheader variable (see documentation) or update the content of the header.tml file – which contains the system-wide custom default header. Note that TeraScript uses an internal header if these two settings are not set/empty which is: HTTP/1.1 <@HTTPSTATUSCODE> <@HTTPREASONPHRASE><@CRLF>Content-Type: text/html<@CRLF><@SETCOOKIES><@USERREFERENCECOOKIE><@CRLF> You will need to add your additional headers to that string. The headers in question are typically the Cache-Control , Expires, and Pragma headers. Note that the Expires and Pragma headers are HTTP/1.0 headers and while typically included, should no longer be necessary. Wikipedia has a page on headers: http://en.wikipedia.org/wiki/List_of_HTTP_header_fields And here is a simple post with some good examples: http://stackoverflow.com/questions/10786054/how-to-prevent-caching-in-internet-explorer-9-thru-http-response-headers-in-java I also found this, for those that want a good read: http://www.mnot.net/cache_docs/ To replicate the suggested headers in the stackoverflow post in TS, you would make your header read like this (untested): HTTP/1.1 <@HTTPSTATUSCODE> <@HTTPREASONPHRASE><@CRLF>Content-Type: text/html<@CRLF>Expires: <@TOGMT <CURRENTTIMESTAMP> format=datetime:http><@CRLF>Pragma: no-cache<@CRLF>Cache-Control: no-store, no-cache, must-revalidate<@CRLF><@SETCOOKIES><@USERREFERENCECOOKIE><@CRLF> Hope that helps, Robert From: WebDude [mailto:[email protected]] Sent: Tuesday, October 02, 2012 9:32 AM To: [email protected] Subject: TeraScript-Talk: OT somewhat - IE9 and cache Has anyone here noticed how screwed up IE9 is with caching? I have been updating some apps in Tera and noticed that IE9 will not show updated results. I have tried just about everything to get it to work right. We have tested this in IE9, 8, 7 and 6. Chrome, Firefox, etc. on multiple platforms. Yes, we have purged the apps in Tera and still the same result but only in IE9. The problem we are having is that some customers are beginning to complain about this. I have surfed the web and found that other developers are having some of the same problems. Especially when changing css and js files and most notably, redirects not purging. That includes serverside redirects and http redirects. It seems that IE9 is tied to indexing in Windows and history and cache files are also stored there (I might be wrong about this, but this is the impression I got.). Seems other developers are having some of the same issues in ASP and PHP. Does any one here know of a serverside solution, possibly in IIS that would solve the issue? It is going to be a pain to randomize URLs or to be using no-cache headers on results. _____ To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. _____ To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. _____ To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. _____ To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. _____ To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
