Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE9 debugger - On the "Script" tab, what are the scripts in the "Others" section when you are debugging?

They are usually named "Script Block (#)" with the pound sign being an arbitrary number but I've also seen blank html docs (html and body tags only) in the "Others" section as well. To be more specific, the "Others" section I'm referring to can be found in the drop down on the left of the "Start Debugging" button in the Internet Explorer 9 debugger's "Script" tab. (Assuming you are on a webpage generating "Others") Also, you must be currently debugging to see the "Others" section.

I have an application with a few plugins that I'm assuming are causing those "Others" to show up. The "script blocks" are actually being generated and not removed so it slowly begins to eat up memory until I have to refresh the page. After searching the web unsuccesfully I decided to come here to hopefully gain some more insight on why these are being created and what exactly they are?

Sorry for the awful description above but I really don't know of a better way to describe what I'm talking about, I guess that's why I'm here...

like image 467
Brandon Avatar asked Nov 02 '22 23:11

Brandon


1 Answers

This is similar to:

http://i.imgur.com/n6fCYhn.png

in Firebug (Firefox).

From their wiki, the purpose of this is to show three kinds of scripts:

  • static: All scripts, that are loaded together with the page (via the tag)

  • eval(): Scripts, that are executed using the eval() function (typically scripts loaded via an XMLHttpRequest)

  • event: Scripts, that are generated through an event (like e. g. client side table sorting)

In IE, you have:

  • anonymous, which I assume is just for anonymous functions in script files e.g. (function () { })();.

  • eval code, which is code compiled as a result of eval() statements.

  • javascript:, which I believe would be something from an onclick="javascript: ... ;" statement (not sure on that one - someone can probably update).

And:

  • script block, which will probably be code that is inserted as a <script> block into the document during run time.

I think, in each case, IE is compiling the results of these scripts into these files for quick access, just like a cache. The blank documents are possibly things that IE does not have a visual representation for.

While this answer isn't the most complete, as I'm giving a lot of assumptions, I hope it helps!

like image 73
Ash Clarke Avatar answered Nov 09 '22 11:11

Ash Clarke