4

I would like to ask in what situations could this even be possible? I've got a website with a window.onresize event, works in firefox, IE9, Chrome Incognito windows, but not in Chrome. The thing is, it used to work before I made some unrelated changes to my code, or before I updated chrome yesterday (? can't tell).

No javascript console errors are reported in firefox nor in chrome.

Not even the most basic thing works window.onresize = t; function t (e) { alert("wtf?");}.

Is it possible that I've missed some } somewhere that magically makes the code still work everywhere except in chrome and without showing any errors? What's the javascript difference between chrome and chrome incognito?

Sorry for the obscure question, but really, that's all I've got, and I've spent some time on this...

[EDIT] It was ScreenCapture's fault, a google extension: https://chrome.google.com/webstore/detail/cpngackimfmofbokmjmljamhdncknpmg

But this is a problem, I can't expect people to turn off their extensions to view my website. Why is it interfering with my code like that?

Spectraljump
  • 4,189
  • 10
  • 40
  • 55
  • Thanks man! i spent a lot of time re-checking my code. I could have spent more, aimlessly! Thanks! – Augiwan Jan 15 '12 at 12:25

1 Answers1

8

Clear your cache. In Chrome for Mac, that's Chrome -> Clear Browsing Data -> Empty the Cache.

Most likely, some file in your cache is missing, outdated, or corrupted, which is why it would work in Incognito mode, but not in a normal Chrome window. Clear your cache, and if that doesn't work, make sure Chrome is updated to the latest version.

In other words, the differences between "Incognito Chrome" and "Regular Chrome" are that Incognito mode has different caches, settings, and may not use extensions by default. So if there's a problem between them, it's most likely an issue with one of those features.

Edit: Thanks Darhazer, there's a small possibility that it could also be the result of an interfering plugin. If the above doesn't work, try going to Window -> Extensions and disabling extensions to see if that might be causing the issue.

element119
  • 7,475
  • 8
  • 51
  • 74
  • 1
    Another reason may be a plugin, in Incognito all plugins are disabled by default. – Maxim Krizhanovsky Nov 07 '11 at 19:58
  • Actually guys, I thought so too until I visited my page from college today, and same problems. As a matter of fact, you can check my page too, and try to resize the window, if the content doesn't scale, it means that the onrezise wasn't called. – Spectraljump Nov 07 '11 at 20:28
  • @me Oh snap, it WAS an extension, that I also had in college.... Just have to figure out which and why. Thanks! – Spectraljump Nov 07 '11 at 20:34
  • 1
    It was ScreenCapture by Google. https://chrome.google.com/webstore/detail/cpngackimfmofbokmjmljamhdncknpmg – Spectraljump Nov 07 '11 at 20:37
  • This helped me a lot. I had a simple `window.onresize` function that wasn't firing only in Chrome. My "UserZoom Survey Tool" Extension was preventing it from firing. – Leeish Feb 11 '13 at 15:17