I believe Chrome shows the original source because when you View Source, it requests the page again. This complicates debugging Ajax requests (and also Get and Post requests).<p>Firefox and IE show the "current" source, which is liable to be replaced as shown by dave1010uk.<p>Type the following into the Chrome Dev Tools console, then the Firebug console:<p><pre><code> testBool = true;
document.write('');
typeof testBool;
</code></pre>
Chrome shows boolean, firefox shows undefined.
Since the site seems to be down, you can read the article (no images unfortunately) in Google's Cache[1].<p>[1]: <a href="https://webcache.googleusercontent.com/search?q=cache:http://www.scriptjunkie.us/2011/09/original-source-forgery/&hl=en&strip=1" rel="nofollow">https://webcache.googleusercontent.com/search?q=cache:http:/...</a>
Older Internet Explorer and Firefox versions displayed the source that was downloaded, not the one generated/modified by scripts. It makes so much more sense, especially since there was always an option to view the generated source (by using JavaScript for an example) but I don't see how you can access the downloaded source at all if View Source is replaced by View Generated Source. Hm, actually one could use FireBug and watch Net response I suppose, but that's inconvenient.
Hmm, I can't reproduce what he claims by only looking at the cached version without images and source code.<p>I especially don't understand this part:<p><pre><code> When you use document.write outside of a script tag embedded inline in
the page [...]
</code></pre>
What is "outside of a script tag embedded inline in the page" supposed to mean?