Domino 9 und frühere Versionen > Administration & Userprobleme

Web-Aktualität

(1/2) > >>

Andreas Kramer:
Hallo Community

Ich habe eine Datenbank erstellt, welche eigentlich aussschließlich über das Web benutzt wird.

Das Problem ist nun folgendes:

Wenn ich etwas in der Datenbank ändere: hier z.b. eine Kundenadresse. Muss ich jedes mal sobald ich eine Seite ein neuen view oder was auch immer öffne.  Vorher auf "Refresh" im Browser drücken. Da sonst noch der alte Inhalt angezeigt wird.

Gibt es eine Möglichkeit den Browser über Notes dahin zubewegen, so dass er sich immer selbst den aktuellen Content holt?


Besten Dank

Andreas

m3:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
und/oder die Seite in der Vergangenheit "expiren" lassen:
<meta http-equiv="expires" content="thu, 16 DEC 1999 00:04:00 PST">

Eine etwas "korrektere" Satzzeichensetzung sowie Groß/Kleinschreibung Deines Textes würde die Hilfestellung vereinfachen. Danke!

maxg:
über ein <META http-equiv="expires" content"0"> sollte es z.b. gehen

Max

 >:(zu langsam gewesen ;)

m3:

--- Zitat von: maxg am 29.03.05 - 18:14:59 ---<META http-equiv="expires" content"0">
--- Ende Zitat ---
Sorry, das ist nicht korrekt/richtig.
Laut RFC 2068 MÜSSEN alle Datums/Zeitwerte in dem Format angegeben werden, das in der RFC 1123 spezifiziert wird.

"0" ist also kein gültiger Wert und sollte von allen Browsern ignoriert werden. Korrekt wäre etwa content="Sat, 01 Dec 2001 00:00:00 GMT"

Marinero Atlántico:
Das ist keine triviale Frage und teilweise auch noch browserabhängig (s. Link bzgl Diskussionen zu IE 5)

Jedenfalls soll man diese 3 Headerwerte so setzen:

--- Zitat ---// als JSP
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>

--- Ende Zitat ---

--- Code: --- <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <!-- HTTP 1.1 -->
 <META HTTP-EQUIV="Pragma" CONTENT="NO-CACHE"> <!-- HTTP 1.1 -->
<META HTTP-EQUIV="Expires" CONTENT=0> <!-- HTTP 1.1 -->

--- Ende Code ---
@m3. Bist du sicher, dass man für den Expires Wert nicht u.U. doch vielleicht milisekunden seit irgendein Tag im Jahr 1970 nehmen kann, oder so etwas die Richtung. Jedenfalls wird das seit Jahren so gemacht.
Wichtig ist wohl, dass alle 3 Meta-Tags gesetzt werden. Der eine ist für HTTP 1.0, der andere für HTTP 1.1 und der 3. dafür, um Proxy-Server davon zu überzeugen, nicht zu cachen.

hmm. wobei, dass sieht irgendwie moderner aus:

--- Code: ---/ Set to expire far in the past.
  res.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");

  // Set standard HTTP/1.1 no-cache headers.
  res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");

  // Set IE extended HTTP/1.1 no-cache headers (use addHeader).
  res.addHeader("Cache-Control", "post-check=0, pre-check=0");

  // Set standard HTTP/1.0 no-cache header.
  res.setHeader("Pragma", "no-cache");

The Expires header indicates that the page expired long ago, thus making the page a poor cache candidate. The first Cache-Control header sets three directives that each disable caching. One tells caches not to store this content, another not to use the content to satisfy another request, and the last to always revalidate the content on a later request if it's expired (which, conveniently, it always is). One directive might be fine, but in magic spells and on the Web, it's always good to play things safe.

The second Cache-Control header sets two caching "extensions" supported by Microsoft Internet Explorer. Without getting into the details on nonstandard directives, suffice to say that setting pre-check and post-check to 0 indicates that the content should always be refetched. Because it's adding another value to the Cache-Control header, we use addHeader( ), introduced in Servlet API 2.2. For servlet containers supporting earlier versions, you can combine the two calls onto one line.

The last header, Pragma, is defined in HTTP/1.0 and supported by some caches that don't understand Cache-Control. Put these headers together, and you have a potent mix of directives to disable caching. Some programmers also add a getLastModified( ) method that returns a time in the past.

--- Ende Code ---
Vielleicht hat m3 doch Recht?

Jedenfalls manchmal nicht trivial.
Hatte das aber vor Jahren schon mit den 3 Tags gemacht und das lief eigentlich. Hat sich auch nie jemand beschwert.
Hier ist jedenfalls eine längere Diskussion:
http://www.jguru.com/faq/view.jsp?EID=377&page=2




Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln