tags:

views:

83

answers:

2

For Javascript code that is linked or generated, what is the best way to view all of them?

Examples are like the Google AdSense or Analytics code, such as

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxx";
  [...]
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
</script>

I usually use Firefox's add-on Web Developer -> Information -> View Javascript. Are there other ways too?

+8  A: 

Firebug hands down the best web development tool there is.

Firebug lets you very quickly and easily see all of the javascript used on a page, as well as CSS, HTML, and even monitoring network requests.

You may also be interested in Javascript Deobfuscator. Despite it's name, it's actual much better than just a deobfuscator.

Jonathan Fingland
i only use Web Developer to view it before. How is that done on Firebug? thanks.
動靜能量
install the extension and click on the icon in the lower left (or press F12) to open the firebug panel. From there you can choose what to monitor and look at the details of each on the tabs
Jonathan Fingland
is it the Script tab? I don't see all the resultant script there but just the link...
動靜能量
Once the script tab is active, there will be a file picker drop down menu (it usually renders just above the script tab itself)
David Dorward
+2  A: 

Does Firebug do what you need?

Firebug does *everything* you need.
annakata
@annakata, eh, not quite. It does not show HTTP requests to favicon.ico, which are always issues by the browser. Anyway, nitpicking :).
Ionuț G. Stan
maybe Firebug cannot do this too: http://stackoverflow.com/questions/949624 not a big deal, but can be nice to have.
動靜能量