views:

19

answers:

1

I am seeing something weird in some logs and I was wondering if someone could suggest how this could happen. I am looking at error logs sent from the client-side of a web application.

The logging has information about the client-side data that would seem to indicate that a certain <script> block within the page has not ran. The clients browser is running javascript though, otherwise the log results would not be available. The logging component is included in an external javascript file.

I can think of two scenarios where this may have happened. Perhaps there was a script error in the ignored <script> block. I have tried to rule this scenario out.

Another scenario might have to do with some security settings on the browser. Maybe certain script blocks were not allowed to run due to user preferences. I'm not sure if browsers look like this though. Browsers may have javascript disabled altogether, but I don't know of any browsers or tools that would partially disabled javascript.

Does anyone know of a way javascript might be partially disabled or filtered? Any special browsers or firewall rules, ... any possible explanation.

+1  A: 

Some company firewalls like to block "suspicious" JavaScript; see You cannot rely on JavaScript being available. Period.

On the user side, addons like Adblock Plus and NoScript can selectively block scripts in Firefox.

Jeffery To
Ahh interesting NoScript will block script on one domain but not another within the same page. I wasn't able to repro the issue like that though... will need to look at it more. I get that I can't rely on javascript being available, but wonder about cases where only some script blocks are disallowed.
Frank Schwieterman
If you only have one script block that isn't executing, then it's most likely an error causing execution to stop or, if the block is dynamically added, the block isn't being run at all.
Jeffery To