Chrome is loading cached (incorrect) files

8,405 views
Skip to first unread message

da...@thielen.com

unread,
Apr 16, 2014, 4:37:56 PM4/16/14
to google-chrome-...@googlegroups.com
I am trying to debug some javascript. I just spent 3 hours thinking there was something wrong with my code and then discovered no, it's chrome.

Here's the source:

And here's the file in IE:

And finally here it is in chrome:

Notice how in chrome it is different code? That's my code from several hours ago. I rebooted my system. I had chrome flush all cached images & files. And still it is using an old file.

Is there any way to avoid this or should I use IE for all javascript debugging?


PhistucK

unread,
Apr 16, 2014, 4:42:16 PM4/16/14
to Google Chrome Developer Tools
Hm, Chrome takes the file:// version, Internet Explorer takes the http://localhost version...
Not the same file or URL.

(And I do not understand where the third screenshot fits in all of this)


PhistucK


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/56142bd5-6fe0-4db0-9ff0-b4c5743309f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

da...@thielen.com

unread,
Apr 16, 2014, 7:03:45 PM4/16/14
to google-chrome-...@googlegroups.com
No, both are using the same url. The first screenshot is my IDE - WebStorm. So that's the file on disk as seen in the IDE. The second is IE and the third screenshot is chrome.

Both IE and chrome are using the exact same url. And that url is serving up via IIS Express the file shown in the IDE.

thanks - dave


On Wednesday, April 16, 2014 2:42:16 PM UTC-6, PhistucK wrote:
Hm, Chrome takes the file:// version, Internet Explorer takes the http://localhost version...
Not the same file or URL.

(And I do not understand where the third screenshot fits in all of this)


PhistucK


On Wed, Apr 16, 2014 at 11:37 PM, <da...@thielen.com> wrote:
I am trying to debug some javascript. I just spent 3 hours thinking there was something wrong with my code and then discovered no, it's chrome.

Here's the source:

And here's the file in IE:

And finally here it is in chrome:

Notice how in chrome it is different code? That's my code from several hours ago. I rebooted my system. I had chrome flush all cached images & files. And still it is using an old file.

Is there any way to avoid this or should I use IE for all javascript debugging?


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

PhistucK

unread,
Apr 16, 2014, 7:24:20 PM4/16/14
to Google Chrome Developer Tools
But the third screenshot shows "worker-api.js" and not "test-layout.js"... am I missing something?


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/dc2c4d42-b2fe-4168-ab4f-b2327dc390d6%40googlegroups.com.

da...@thielen.com

unread,
Apr 18, 2014, 10:48:42 AM4/18/14
to google-chrome-...@googlegroups.com
Sorry, I had a screenshot of the wrong file for one. Here it is as it's happening this morning. The file is worker-api.js (from worker-api.ts).

The source file (in WebStorm):

The source file in IE (correct - matches WebStorm):

The source file in Chrome (incorrect - is code from several days ago):

Why is Chrome using file contents that no longer exist? And yes I cleared cached images & data. And then rebooted. And still have this problem.

PhistucK

unread,
Apr 18, 2014, 11:58:42 AM4/18/14
to Google Chrome Developer Tools
That looks weird. Have you tried inspecting the network using Fiddler2 (to see if the browser is actually requesting the scripts again)?
chrome:net-internals might give you a clue, though it is a bit verbose.

Also, have you enabled the "Disable cache" setting of the Developer Tools (cog wheel button>check "Disable cache (while DevTools is open)"?


PhistucK


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

da...@thielen.com

unread,
Apr 22, 2014, 7:06:29 PM4/22/14
to google-chrome-...@googlegroups.com
The "Disable cache" setting appears to be the issue. I was unaware of that. Thank you!!

Steve Capell

unread,
Oct 9, 2015, 3:21:55 AM10/9/15
to Google Chrome Developer Tools
I ran into this bug recently and it's a real pain. I wanted to point out that this is a real bug, even though disabling the cache does work around the problem. When viewing the source of a Javascript file (not sure about other types), Chrome shows an old version that is not the one being used when it's fetched from another page (eg, the html page). This should never be the case, whether the file comes from a cache or not. And the fact that clearing the cache does not solve the problem is bizarre. Where is that old file being kept to be shown for "view source"?

PhistucK

unread,
Oct 9, 2015, 3:27:45 AM10/9/15
to Google Chrome Developer Tools
If you feel this is a real issue, you can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

Steve Capell

unread,
Oct 9, 2015, 5:05:34 AM10/9/15
to Google Chrome Developer Tools
I found an issue that was sort of close so I posted my experience there:


You received this message because you are subscribed to a topic in the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-chrome-developer-tools/gysw_3qgMMs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/CABc02_%2BxUjf9szOSpY-gW%2B_nmUJUCOWEztHtRFqA-FG9etKFvg%40mail.gmail.com.

PhistucK

unread,
Oct 9, 2015, 5:19:26 AM10/9/15
to Google Chrome Developer Tools
You should file a new issue, as this issue is closed and archived already. Sorry.


PhistucK

Steve Capell

unread,
Oct 9, 2015, 5:47:08 AM10/9/15
to Google Chrome Developer Tools
Reply all
Reply to author
Forward
0 new messages