How to fix Firefox unresponsive script warning on server side? - javascript

Situation:
I have a website that is written in Java (1500 LOC) and compiled to javascript with GWT (Google Web Tools). I started observing "Warning: Unresponsive script" on my website few weeks ago. I got this pop up warning 22 times out of 25 tries.
I can fix this by clearing Firefox browser cache. And after that I saw warning message 1 time / 25 tries.
I am trying to figure out what's the root cause of this. It seems to be a client side issue. My customers are probably not seeing this since they don't load that website as often as I do. However, I feel like they might run into this issue in this future. I wonder if there are something I can do on the server side to eliminate/reduce the occurrence of unresponsive script warning.
Questions:
I compared Firefox "about:cache" before and after I load my website. The only difference is that a 43 byte cache gets created in memory every time I load the website. Is this something normal?
I thought cache is to help users load websites faster, what could be happening in my case? (I guess my website generates new cache every time on load and old cache are not used?)
Since clearing the cache can fix this issue, how can I automatically clear cache when user closes my website?
Could there be an issue in GWT compiled javascript? Could network speed also be a factor?
What else do I need to check and what are the potential solutions to resolve this issue?

Install FireBug to Firefox and see what scripts are timing out. Given this is GWT, there is a good chance something is getting stuck on the server side. If so:
Run you server under a profiler and see where are the host spots or bottlenecks. I prefer JProfiler, been using it for 10+ years.

Related

Chrome, even in incognito won't refresh with new changes to javascript

I'm growing frustrated with the whole mix of Spring Tool Suite, Tomcat and Chrome. I'm working on a website's back end and I'm having all sorts of troubles getting my webpage to reload properly when I make changes to the JavaScript. I've made a fix to a problem in my code and when I go to preview, the error is still there. When I inspect the JavaScript in the Chrome Dev Tools, I see that it is still loading the JavaScript before I made the change, despite me having saved the file. I've rebooted Tomcat, I've been using Incognito mode, I've been deleting my cache and yet even in incognito, Chrome won't dump the old JavaScript file for the new one.
It's getting frustrating, because I waste time with every change I make with the JavaScript trying to wrestle with Chrome and Tomcat to get my webpage to use the most recent saved version of my JavaScript. I don't know if this matters, but I'm not writing my JavaScript in STS with Tomcat and my Java code, but it is in the same folder as my project and when I open it in STS, it always has my most recent save changes anyways.
Is there any fix to this?

How to detect web page crash (not browser crash) using PHP?

How can we detect through PHP or maybe in node.js or other languages if a web page crashed (without the browser EXITing) so that when a user press the "reload" button on the "Aw Snap" page in chrome certain specific content inside the page can be shown in this particular case (crash case).
In a crash without EXIT, a browser shows per example in Google Chrome the famous "Aw, Snap!" page.
I don't want to know how to capture if the user refreshed the page or the page reloaded which can be known quite easily with different methods [one example see this PHP this code which can detect if users refreshed the page on major desktop/mobile browsers except IE unfortunately this code does not capture a crash event and the fact that user might request again the same page after a crash.
I tried using "register_shutdown_function", and some other maneuvers using connection PHP functions like "connection_aborted" etc... but with no success. I figure out a sloppy way through the use of session variables but probably there are better clever manoeuvres.
Any help or suggestion would be greatly appreciated. Any solution in nodejs will be also welcomed.
web brower crash because too many process from your browser to PC of Client.
this crash can't detected by php because PHP server scripting. and you have question.., why not use JS for detect crash of browser?, because JS created just for controller website,. if you force to checked that use ajax, node, etc you can't do that, why? because the problem comes suddenly
and detected crash browser from php is impossible.

Front end profiling

I am trying to help an open source project determine the cause of a front end slowdown.
I am seeing long load times on my end, a full page load takes 10-15 seconds, button clicks can take up to 30 seconds to respond, etc.
Service is running on my local network.
The load on the server is quite low (0.1) so I'm almost positive the issue is with rendering, DOM processing, and whatever other code is running.
curl also shows an extremely fast response, so I know the issue is with the front end.
They cannot reproduce on their end, but I can consistently reproduce on my end.
What else should be profiled besides javascript? What tools should I look into?
OS is Debian 8, browsers are firefox and chromium.
Thanks!
If you need to profile mobile performance, you use chrome on dev machine as the tool, but run the app on a mobile device.

Chrome Console Error: chromeHidden.Port.dispatchOnDisconnect

NO idea what that means. Been developing some facebook apps and some apparently related js errors show up.
According to this thread it's a lazy load issue. I am running chrome with the default settings though.
http://code.google.com/p/chromium/issues/detail?id=100977
Once and a while (about one in five times) this breaks facebook app authentication. chromeHidden.Port.dispatchOnDisconnect shows up like 8 times sequentially in the console, with no indicator of what code is breaking.
Anyone else encounter this, or know exactly what causes it? Is it javascript bugs from facebooks? Some sort of protocol error? Port mismatch?
Mine was due to the chrome2phone extension
If you've disabled an extension and the problem no longer persists, please file a bug against the extension (probably most pertinent) or the Chromium forum (http://code.google.com/p/chromium/).

Constant Client Disconnects in Classic ASP Web Application

I'm working with a Classic ASP web app that typically runs well considering the old technology. It is an online support chat application that basically refreshes the client side Live Monitor page every 10 seconds to see if there are any pending chat requests. The past few days, a lot of our users are having a problem where this page either just ends up refreshing and going blank white (with no html in view source), or it goes to a generic IE error page "This program cannot display the webpage" - the same error you see when you are offline. I was able to recreate the issue after hours when I was the only user in the chat system, so it's not a matter of an overloaded server I don't think.
I've tried the following to no avail:
Recycle Application Pool
Reboot IIS Server
Change refresh from javascript to meta tag
Check IIS Error logs (nothing)
Check IIS event logs (nothing)
One thing that seemed to work for me, but didn't work for everyone else, was to disable our network Proxy server settings in the browser. Once I disable this, I can't get it to error out anymore... however, other users aren't quite so lucky.
Any thoughts on where to go with this? I'm at a bit of a loss here...
Thanks,
Shawn
We are finding the same problems in a .Net solution. It looks as if the issues are related to SQL Locking so we're working on those as we find them.

Categories

Resources