8

Is there a keyboard shortcut for Google Chrome that lets you reload a frame (iframe) that has focus? The only way I've found to do it is via right click.

Pressing F-5 while the frame has focus (e.g. while actively in a form element) reloads the entire parent page or does nothing, depending on where the focus lies within the frame. I'm hoping to avoid that, as I'm debugging a rather massive form that is loaded in an iframe.

Update:

  • Version: Chrome 16.0.912.75 (I love those version numbers) Anyway, stable.
  • OS: Windows 7 and XP.
Tim Post
  • 891
  • 2
  • 8
  • 21
  • 1
    Is it possible to open the iframe content in a new tab? – Daniel Beck Jan 10 '12 at 19:24
  • Which operating system? I ask, because AutoHotkey is perfect for this kind of thing on Windows. – iglvzx Jan 10 '12 at 19:25
  • Are you able to use e.g. Safari instead? I solved it with Safari... but Chrome apparently has bugs related to reloading iframes. – Daniel Beck Jan 10 '12 at 19:46
  • I'm hoping for something cross-OS, however I'm using the stable version on XP and Windows 7 currently. I'll happily accept an answer that says 'no' with a link and summary of a bug report, I can't be the only one wondering about this :) – Tim Post Jan 10 '12 at 20:36
  • @DanielBeck Yes, but kind of hard to debug. The frame is (sometimes) loaded in a modal, but the behavior is the same either way. Shortly, opening in a new tab is not going to be possible. – Tim Post Jan 10 '12 at 20:42
  • I tried going the bookmarklet route. Works like a charm in Safari, but I'm pretty sure there's a bug in Chrome. Will have to investigate some more. Sorry couldn't be of more help. – Daniel Beck Jan 10 '12 at 20:58
  • @DanielBeck That was actually a lot of help. Thanks for chiming in. I fear the answer to this is 'no' :) – Tim Post Jan 10 '12 at 21:04
  • 1
    In case someone needs it: In Safari, you can use the bookmarklet `javascript:(function(){x=document.activeElement;if(x.tagName=="IFRAME"){x=x.contentWindow;x.location.reload();}})();`. I'm afraid a bug prevents this from working in Chrome though. – Daniel Beck Jan 10 '12 at 21:11

1 Answers1

8

No. There's no shortcut because the browser needs to know what frame to reload. You can right-click inside the iFrame and select Reload frame from the context menu.

There's also a suggestion to program a mouse gesture for this purpose but it's for Firefox. You can check out Chrome extensions for mouse gestures.

dnbrv
  • 895
  • 1
  • 6
  • 17
  • `document.activeElement` gives you the iframe from the parent document or a bookmarklet, if its content is focused. – Daniel Beck Jan 10 '12 at 21:12
  • Any suggestions for an extension that might suit the problem? They are, after all, a rather vast sea :) – Tim Post Jan 10 '12 at 21:20
  • So you're suggesting to create a bookmark containing JS that will work the following way: *user clicks inside an iFrame* -> *user clicks on the bookmark*. How's that different from *right-click the iFrame* -> *click Reload frame*? – dnbrv Jan 10 '12 at 21:22
  • @TimPost: There's no way to do it without a mouse and in fewer than 2 steps because of the [DOM](http://en.wikipedia.org/wiki/Document_Object_Model). Even an extension needs to know what the active iFrame is. – dnbrv Jan 10 '12 at 21:24
  • @dnbrv Extensions can use local storage, which is why I asked. I don't mind telling an extension what ID I'm scoping if I can just tab through it later. – Tim Post Jan 10 '12 at 21:38
  • @dnbrv Opera has a keyboard shortcut (alt+f5), so it's not an impossible task. – GDR Nov 13 '13 at 17:27
  • 1
    Welcome five years later and people still get annoyed to death by this missing feature. No matter what I try, I cannot get Chrome to properly reload an iFrame. Even with the "Disable Cache" checkbox set in an open dev window, it still caches JS / CSS files. – needfulthing Feb 12 '19 at 11:28