Page 1 of 1
External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 2:30 am
by TooCrooked
javascript in an external file is not being "reloaded"??? please see my video. it will answer ALL your questions.
http://youtu.be/ppcZ5piCUOY
why aren't scripts written to an external file reloading as expected???
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 2:49 am
by barbaz
What if you clear the browser cache before reloading the page?
If that doesn't work you've probably found a bug in NoScript...
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 2:54 am
by TooCrooked
clearing results in the same issue. the changing of the source file has no effect on subsequent reloads.
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 2:55 am
by barbaz
OK I'm going to dig around in the source and see if I can produce a more detailed report.
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 3:04 am
by barbaz
I think what's happening is that NoScript is preloading the file at the time of surrogate creation rather than reading the file synchronously when it's needed, so if the file is changed externally NoScript won't know that anything happened.
I think that unfortunately for you, the way Giorgio has designed it is the best way performance-wise.
If you change the file, then make any changes to either surrogate pref (then change it back to what you want), do your changes to the file load?
I expect that in any case restarting the browser would get the new contents of the file.
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 10:17 pm
by TooCrooked
can we get him to comment on this to see if that's truth rather than your hunch?
Re: External File Surrogates Not Working Correctly
Posted: Sat Aug 30, 2014 10:37 pm
by Giorgio Maone
TooCrooked wrote:can we get him to comment on this to see if that's truth rather than your hunch?
That's exactly how it works. Otherwise it should perform blocking disk I/O every time a page which need a replacement is loaded, which is unacceptable performance-wise.
Re: External File Surrogates Not Working Correctly
Posted: Mon Sep 01, 2014 2:49 pm
by TooCrooked
Thank you for confirming.
Would it be possible, for the purposes of debugging, for you to implement the ability to change some noscript about:config preference to allow synchronous loading of external files?
having to close and reopen the browser is beyond exceedingly tedious!
Re: External File Surrogates Not Working Correctly
Posted: Mon Sep 01, 2014 4:22 pm
by Giorgio Maone
TooCrooked wrote:
having to close and reopen the browser is beyond exceedingly tedious!
You don't need to do that.
Just keep
about:config open and modify any noscript.surrogate.* preference value to trigger a full reload.
Re: External File Surrogates Not Working Correctly
Posted: Mon Sep 01, 2014 10:08 pm
by Thrawn
The heavyweight approach, I guess, would be to set up a file monitor that would alert NoScript to any changes in the file. But that's very likely not worthwhile.
Re: External File Surrogates Not Working Correctly
Posted: Fri Sep 05, 2014 4:59 pm
by TooCrooked
Giorgio Maone wrote:Just keep
about:config open and modify any noscript.surrogate.* preference value to trigger a full reload.
?? what do you mean?
Re: External File Surrogates Not Working Correctly
Posted: Fri Sep 05, 2014 5:04 pm
by TooCrooked
so you're saying i have to edit my file, then go into about config, change any random preference (double click, add info, click okay, switch back to tab, reload) to get "updates" to my file?
edit...
that's exactly what you're saying. 12 billion clicks, mousemovements and typing to get a file to reload. incredible!
Re: External File Surrogates Not Working Correctly
Posted: Fri Sep 05, 2014 5:22 pm
by TooCrooked
well, in either case, it's not working reliably. it was working initially and then it just stopped working. ill illustrate later.
Re: External File Surrogates Not Working Correctly
Posted: Sat Sep 06, 2014 6:28 am
by Thrawn
TooCrooked wrote:
that's exactly what you're saying. 12 billion clicks, mousemovements and typing to get a file to reload. incredible!
Giorgio already explained that automatically picking up the changes would be obscenely expensive.