Changeset 2957
- Timestamp:
- 2002-02-09T20:37:28+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r2942 r2957 757 757 // content response 758 758 759 // prevent dynamic content from being cached760 contentout << text_t2ascii761 << "Expires: 0\n"762 << "Cache-Control: no-cache, must-revalidate\n";763 764 759 // use the later of build.cfg and collect.cfg modification times 765 760 // as the Last-Modified: header, for caching values … … 803 798 } 804 799 } 800 801 /* 802 // This block of code should prevent the users browser from caching 803 // the page. It may be useful to uncomment this code and comment out 804 // that directly above (which sets a "Last-Modified" header) when 805 // doing interface development work where a given page may be 806 // changing often. 807 808 contentout << "Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"; // date in the past 809 tm *tm_ptr = NULL; 810 time_t t = time(NULL); 811 tm_ptr = gmtime (&t); 812 if (tm_ptr != NULL) { 813 char *timestr = new char[128]; 814 strftime (timestr, 128, "%a, %d %b %Y %H:%M:%S", tm_ptr); 815 contentout << "Last-Modified: " << timestr << " GMT\n"; // always modified 816 delete timestr; 817 } 818 contentout << "Cache-Control: no-cache, must-revalidate\n"; // HTTP/1.1 819 contentout << "Pragma: no-cache\n"; // HTTP/1.0 820 */ 805 821 806 822 contentout << text_t2ascii << "Content-type: " << response_data << "\n\n";
Note:
See TracChangeset
for help on using the changeset viewer.