2

I'm trying to find a way to view the generated source using IE 10. With the Chrome dev tools and Firebug I can see the HTML source post JavaScript/AJAX operations but in IE 10 the view source command and dev tools both only show the downloaded source.

I'm building a single page javascript web app and am running into an issue in the generated source that only happens in IE. Using something like ChromeFrame or punting on the issue is not an option. I need to find and fix the root issue that is causing it in IE.

Do you all know of a different set of dev tools or a toolbar that is produced for IE 10 that will allow me to inspect this elusive generated html?

Thanks!

Josh R
  • 1,970
  • 3
  • 27
  • 45

2 Answers2

9

Just press F12. If the DOM was manipulated via AJAX, you'll need to use the blue refresh button per the comments below.

Snekse
  • 15,474
  • 10
  • 62
  • 77
Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • 2
    Indeed, IE has had [developer tools since IE8](http://msdn.microsoft.com/en-us/library/ie/hh673541(v=vs.85).aspx). – ajp15243 Apr 23 '13 at 19:43
  • er... I think you didn't read the question. The OP knows about F12/dev tools – Christophe Apr 23 '13 at 19:44
  • For me the built-in F12 dev tools aren't showing updated source after the web app makes some data calls and appends the data to different elements. Am I doing something wrong when using them or is this behavior not normal? – Josh R Apr 23 '13 at 19:45
  • 7
    Click the little blue "refresh" button in the F12 dev tools and it will update the HTML tree. It doesn't update in realtime like Chrome's does. – Niet the Dark Absol Apr 23 '13 at 19:45
  • @ajp15243 IE 7 had Developer Toolbar (not necessarily natively) – Ian Apr 23 '13 at 19:48
  • @Ian I am aware, as I have had the misfortune of needing to use them. As you surmise they are not native and had to be installed separately, though IIRC they were still official tools from Microsoft. – ajp15243 Apr 23 '13 at 19:51
  • @ajp15243 Haha so have I. Anyways, Firebug Lite isn't a bad tool for non-Firefox – Ian Apr 23 '13 at 19:53
  • 1
    Where is this little blue refresh button. I can't find it :( – Nick Rolando May 23 '15 at 01:46
  • what keystroke will expand all DOM nodes? – ycomp Apr 15 '16 at 21:07
1

I use alert(document.documentElement.outerHTML) to achieve this

JohnnyFaldo
  • 4,121
  • 4
  • 19
  • 29
  • Nice ! A solution that works the same in all current (and future) browsers. Might still be improved by writing it to a temporary file... – Garo Nov 15 '19 at 09:11
  • (Tiny) caveat: The starting ` ` (or similar) tag will not be shown – Garo Nov 15 '19 at 09:29