[Webkit-unassigned] [Bug 22568] Impossible to clear cached javascript without closing and restarting webkit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 22 10:45:12 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=22568


memimo at mac.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |memimo at mac.com




------- Comment #2 from memimo at mac.com  2009-01-22 10:45 PDT -------
(In reply to comment #1)
> Can you please provide a specific example of something that is no longer
> working?  We need specific steps to reproduce the problem in order to
> investigate it.
> 

Hi Mark,

I use the mac version of the WebKit browser to test all of the code I write for
departmental websites and have done for around 1 year now. I've been seeing the
same issue for approximately 1 month.

I set up a quick test case to demonstrate the problem. I create a folder with
the following layout:

/index.html
/javascript/class/Main.js
/javascript/library/prototype.js

index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <script type="application/javascript" language="JavaScript1.6"
src="javascript/library/prototype.js"></script>
        <script type="application/javascript" language="JavaScript1.6"
src="javascript/class/Main.js"></script>
        <title>js cache test</title>
</head>
<body onload="new Main();">
</body>
</html>

Main.js:

var Main = Class.create({
        initialize: function () {
                alert("this is main calling");
        }
});

The prototype library is the latest one available from prototypejs.org.

When you load the index.html file in the WebKit browser, the onload statement
causes  a Main object to be instantiated. It's initialize function is called
and an alert displayed. The problem is visible if you edit the Main.js file to
change sting to be displayed by the alert, clear the browser cache and reload
the page. When the page loads, the original sting is still displayed in the
alert. If you check in the WebKit inspector -> resources section, the original
version of Main.js is shown. This was not the behavior of pervious builds of
WebKit. In the past, if you cleared the browse cache and reloaded the page the
changes to your javascript were picked up.

I have tried both disabling caches in the Develop menu and setting the
following meta tag without a positive outcome:

<meta http-equiv="Cache-Control" content="No-Cache">

I am using Mac OS X 10.5.6 on both intel and PPC machines. I could reproduce
the problem in the mac WebKit build: WebKit r40102. I have not tried on the
windows version.

I hope that this has been of some help.

Gordon


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list