Closed
Bug 89584
Opened 24 years ago
Closed 24 years ago
Caching iframes not updated properly
Categories
(Core :: Networking: Cache, defect)
Tracking
()
People
(Reporter: Graham.Robertson, Assigned: gordon)
References
()
Details
This bug has occured since the new caching mechanism appeared in Mozilla. It is
not a problem in 0.9.0
I have a created a servlet that generates a simple web page with an iframe.
The web page produced by the servlet looks like this
<html><head><title>mozbug</title></head><body>
<p>The servlet has received a GET. This is the reply.</p>
<p>Showing iframe /servlet/moztest.mozbug?frame=17484</p>
<iframe src="/servlet/moztest.mozbug?frame=17484" />
</body></html>
The iframe is a also a servlet web page that just shows the frame number
This is a web based application. So every time the page is refreshed the src of
the iframe changes.
In the latest versions of Mozilla when the use presses refresh the web page is
updated and when you view the html the frame src has changed but the browser
never requests the new page for the iframe. If it does request an iframe page it
requests the old one again despite there no longer being a reference to it. I
enclose the full source of the test servlet which demonstrates this serious
problem. On the web page shown created by the servlet the two frame numbers
should always match. But when you refresh the page they don't.
package moztest;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class mozbug extends HttpServlet {
private static final String CONTENT_TYPE = "text/html";
/**Initialize global variables*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
/**Process the HTTP Get request*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
response.setHeader ("Expires", "Mon, 01 Jan 1990 00:00:00 GMT");
response.setDateHeader ("Last-Modified", System.currentTimeMillis());
response.setHeader("Cache-Control", "no-cache");
PrintWriter out = response.getWriter();
String frame=request.getParameter("frame");
if (frame!=null)
{
out.println("<html>");
out.println("<head><title>mozbug</title></head>");
out.println("<body>");
out.println("<p>This is frame "+frame+"</p>");
out.println("</body></html>");
}
else
{
int value=(int)(100000*Math.random());
out.println("<html>");
out.println("<head><title>mozbug</title></head>");
out.println("<body>");
out.println("<p>The servlet has received a GET. This is the reply.</p>");
String iframe=request.getServletPath()+"?frame="+value;
out.println("<p>Showing iframe "+iframe+"</p>");
out.println("<iframe src=\""+iframe+"\" />");
out.println("</body></html>");
}
}
/**Clean up resources*/
public void destroy() {
}
}
Comment 1•24 years ago
|
||
I've seen this too, but I thought I also found a bug on it. Can't find it now.
Jesse - didn't you mention this to me?
Comment 3•24 years ago
|
||
I run into this all the time while editing test cases: I'll change the src of a
frame and hit reload, but Mozilla will still load the original src in the frame.
I thought I had seen a bug in bugzilla when I first ran into the problem, but I
guess not, because I can't find it now. The earliest bug I can find about this
problem is bug 79063.
Reporter | ||
Comment 4•24 years ago
|
||
I have added a URL that demostrates this bug. Load the page and then press
reload. You will see that the frame number on the page changes but the frame
number inside the page does not.
This page works in Internet Explorer but not in Mozilla.
Comment 5•24 years ago
|
||
*** This bug has been marked as a duplicate of 79063 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•