Search code examples
htmlajaxextjsinspect-element

Information not Visible in Source File View


i have recently started using Senchs extJS.. when we see the source file it only displays what ever is the written code, but what the style has applied or any script that added later is not there in the "View Source"

Same for AJAX, when we load anything in any container, it is not there...

but if we're using Chrome and we inspect the element, it show everything....

WHY this behavior?


Solution

  • View Source in browsers typically only displays the downloaded source without running anything at all (including any JS that would modify the DOM). In fact, at least Chrome will create a separate request when you view source to get that code.

    As for the reason why, I'm not sure exactly. This is just the standard and is the way that "view source" has worked for long before I was ever a web developer. It is similar to doing a raw HTTP request (i.e. you just get the source; nothing runs to change it). The term "Source" indicates the origin of what you have received, unmodified (think "source code.")