You can get the literal source of any file in the same domain with Ajax, which does not display html at first -
//
function fetchSource(url, callback){ try{ var O= new XMLHttpRequest; O.open("GET", url, true); O.onreadystatechange= function(){ if(O.readyState== 4 && O.status== 200){ callback(O.responseText); } }; O.send(null); } catch(er){} return url; } function printSourceCode(text){ var el= document.createElement('textarea'); el.cols= '80'; el.rows= '20'; el.value= text; document.body.appendChild(el); el.focus(); }
fetchSource (location.href, printSourceCode);
kennebec
source share