I cant figure this out..
June 18, 2006 10:04 PM   Subscribe

Is it possible to view the source of an AJAX website?

I'd like to be able to view the "output" source of an AJAX or XML or whatever-its-called website. In Firefox doing "Save as.. webpage, complete" gets very close to what I want except it saves the images to the hardrive and doesnt show the original links that would be in the source. Any ideas?
posted by petsounds to Computers & Internet (6 answers total) 7 users marked this as a favorite
Best answer: Download Chris Pederick's Web Developer extension (from chrispederick.com), and click View Source > View Generated Source.
posted by matthewr at 10:05 PM on June 18, 2006

Also extremely helpful for this sort of thing is Firebug, a Firefox extension for JavaScript and AJAX development. It provides a console which lets you watch AJAX requests (and their responses) in real time as you interact with the page, and an inspector which will let you view the current (i.e. generated) DOM of the page as source or as a node tree and further lets you examine individual elements, see CSS properties that are being employed, etc.
posted by IshmaelGraves at 10:14 PM on June 18, 2006

Wow, cool. I wonder if there's anything like "View Generated Source" for Opera.
posted by evariste at 10:54 PM on June 18, 2006

You can also achieve the same thing (I think) without any extensions by using the DOM inspector and right-clicking on the top-level HTML node of the tree and selecting "Copy XML".
posted by Rhomboid at 11:21 PM on June 18, 2006

Although something to keep in mind is that even the various "generated source" options out there won't be exact -- they show you a serialization of the DOM the browser generated while rendering the page which, thanks to error correction routines for malformed HTML, may not be exactly the same as the source that came down the wire. Ditto for anything that comes out of the DOM Inspector.

In most cases it probably won't be an issue, but it's still good to be aware of.
posted by ubernostrum at 2:44 AM on June 19, 2006

Select the relevant text, or select everything with Ctrl-A, then right-click and choose "view selection source".
posted by smackfu at 6:59 AM on June 19, 2006

« Older Help me identify a book from limited information.   |   Vesa 2.0, good for 3d lib? Newer »
This thread is closed to new comments.