You'd ask for page.jsp?throwaway=1234
Then your browser should think you're asking for a new dynamic page -- your
server process just ignores the additional parameter.
Clayton
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Nishant Baranwal
Sent: 03 April 2001 11:50
To: [EMAIL PROTECTED]
Subject: Re: A tip on how to avoid browser caching problems..
Hi,
How does the server handle this ??
As per your example lets say a random no 1234 is added to 'page.jsp', so
then do you send the request or set location of page to page.jsp1234 or
page1234.jsp ??
In either case, this page may not exist on the web server, so how is
this resolved ??
In other words what changes would be required server side ??
Regards,
Nishant Baranwal
Nihilent Technologies Pvt. Ltd., Pune
Phone: 91-20-6054452/6052253
Mobile: 9823078613
-----Original Message-----
From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 3:37 AM
To: [EMAIL PROTECTED]
Subject: A tip on how to avoid browser caching problems..
Hi there all,
I just wanted to pass on a bit of info I finally got working for web
browsers..just incase some of you out there may be seeing a similar
situation. On our site, we have 3 "top" tabs that all call the same one
URL
to log in to various parts of the site. The URL the browser sees for all
three tabs is identical. Therefore, at times the browser does NOT go to
the
server to display the page, but instead pulls it from cache. Before
anyone
replies about META tags and setting headers..I have done all of this. I
am
not sure if MSIE 5 has a bug with this, or not, but I also see this
happen
sometimes on Netscape 6. Therefore I tend to think despite trying to
tell
the browser never to cache a page, it still does. It mostly seems to
happen
if you rapidly click between the tabs that go to the same URL. Most of
the
time it works right..it goes to the server. I think what happens is,
BEFORE
the page is fully displayed if you click on a link again the browser
does
not at that moment have a page in memory with META tags or what not
telling
it not to cache..so it simply pulls the SAME page from its cache. I
don't
think this is the fault of the browser..per se. What I think browsers
should
do is NOT allow another link to be clickable when a link is clicked
until
the page is done loading, or the STOP button is pressed. At any rate,
someone once told me a while back a "trick" to force the browser to go
to
the server EVERY time is to add a random number to the URL. There are
probably a couple of ways this can be done. However, if you generate a
dynamic page with links having hardcoded random numbers, its again
possible
that while the page is being loaded, the hard-coded link is being looked
at
and is already in the cache so it reloads that cached page again,
effectively not working. So what I did is I created a simple javascript
that
ALL links would call. Instead of <a href="page.jsp">click</a>, you would
do
something like <a href="javascript: handleLink('page.jsp')">click</a>.
Then,
the method would simply add a random number to it, and then cause the
location to change of the page (or frame). I am not sure if this suffers
the
same problem as the hard-coded href links, but it at least is working
for me
right now. I have yet to see a cached page come back.
Just thought I would pass that in..if it helps anyone else out there.
========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets