Why are we not using html meta tag expires

<META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">

am i missing something.?

Vinay Shukla

HPBluestone




-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 3:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Avoid JSP caching by the browser


Lind Jürgen wrote:

> Hi there,
>
> I have the following problem: in order to prevent the web-browser
> from using cached versions of a jsp, we plan to add some unique
> timestamp (which will actually be ignored by the jsp) to the url
> that calls the jsp, e.g.:
>
> <a href="/jsp/view.jsp?ts=<%= System.currentTimeMillis()%>">myjsp</a>
>
> While this works fine when cookies are enabled, it fails when
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
>
> Using the html:link tag, however, introduces the difficulty how to
> dynamically add the timestamp. Using something like
>
> <html:link href="/jsp/view.jsp?ts=<%=
> System.currentTimeMillis()%>">myjsp</html:link>
>

This fails because you cannot intermix constant text and runtime expressions
in a single attribute -- it has to be one or the other:

    <html:link href='<%= "/jsp/view.jsp?ts=" + System.currentTimeMillis()
%>'>myjsp<html:link>

Note the use of single quotes around the entire expression so that the
parser doesn't get confused by the double quotes around Java strings.

>
> fails as the Java Code will not get interpreted but it will be literally
> appended  to the URL, causing a Decode Error in the receiving JSP.
>
> Has anyone experienced similar problems (with the web browser caching
> jsp pages) and could offer some help or are there any suggestions wrt.
> the above evaluation problem?
>

>
> Regards
>
> Jürgen
>

Craig McClanahan

Reply via email to