[Javascript] Firefox: Script removed by snapshot save (when saving generated html page)

Alberto Domingo alberto.domingo at uah.es
Tue Oct 12 09:00:19 CDT 2010


Hello everybody,

Do you know the origin of this behavior?

I use a lot javascript and html to create other pages. I do it for my 
personal use, so there is nothing obscure behind.

I use firefox because the generated code can be saved and creates a 
working page. I use to create not only the html code but also 
javascript scripts, I have been doing this for years, and everything 
was perfect, but for some reason (update? Plugins? Complements?) now 
the contents of the script tag is replaced by this thext:

/* Script removed by snapshot save */

Not only in the html document, but also if this document calls an 
external .js file, the file contents is replaced by the same text when saved.

Any idea about the origin? Is it possible to disable this feature? 
(In my firefox, of course!!)

Thanks in advace.

Alberto.



Here is a test code (also included in the attached zip file)


<html>
<body>
<script type="text/javascript">
function generatepage(){
var t = "";
t += "<HTML>\r";
t += "<HEAD>\r";
t += "<TITLE>";
t += "GENERATED PAGE";
t += "</TITLE>\r";
t += "<scr"+"ipt type='text/javascript' src='somescript.js'>\r";
t += "</scr"+"ipt>\r";
t += "<scr"+"ipt type='text/javascript'>\r";
t += "var a = 1;";
t += "</scr"+"ipt>\r";
t += "</HEAD>\r";
t += "<BODY>\r";
t += "Save this page and look at the saved code. Also in the 
associated folder, look at the scripts."
t += "<scr"+"ipt type='text/javascript' src='otherscript.js'>\r";
t += "</scr"+"ipt>\r";
t += "</BODY>\r";
t += "</HTML>\r";
var W=window.open('',(new Date()).getTime());
W.document.write(t);
W.document.close();
}
</script>
<input type="button" onclick="generatepage();" value="make test page">
</body>
</html>



More information about the Javascript mailing list