How does the Firefox website make its download stats page work? - ajax

On the Mozilla website, there’s a page showing (apparently) live download statistics for Firefox: http://www.mozilla.com/en-US/firefox/stats/
How are they performing their request to get the live stats data? I can not see a constant connection in Firebug.
How is this working?

Looking at the country_report.json response in the Net tab of firebug, you can see something like this for each country:
{"total":95843579,"rps":[5,6,6,7,4,9,12,9,3,10,6,8,8,7,5,10,8,4,12,8,10,10,7,4,9,13,9,4,9,13,7,7,6,18,10,7,9,5,3,6,5,11,9,5,6,9,7,2,8,9,11,5,10,7,5,6,11,7,7,2],"count":455,"name":"United States","code":"US"}
So those graphs are not being updated every second in real time. Instead, they are plotting a recent history of requests, one point per second, and periodically requesting a new set of data to plot.
It seems they use something called SQLstream on their end to gather that data.

OK, here goes. The question I don't understand is answered here:
http://blog.mozilla.com/webdev/2009/08/18/download-stats-move-to-mozilla-com/
have fun :-)

Related

Post Request is too large in jmeter

Facing the issue while developing the performance script for salesforce application. The issue is, one of the apexremote post call is too large in size. Jmeter is getting hanged if i am trying to click that particular request. Even if I manage to enhance the post request somehow the cursor is not going to end of the line. Hence at the end of the line there is one CSRF which I am not able to correlate. This is only happening for only one apex post request. Because of this my orders are getting rejected while provisioning. I tried by increasing my heapsize in jmeter.bat file but no help.Searched in google but didn't find related queries. I tried the same thing with neoload and I was successfully access and enhanced that particular request.
Has anyone experienced ever! How to resolve this.
Please HELP!
1.Basically for that you need to be Patience after clicking on the request and when the request populate properly copy that post data into notepad++for correlation purpose.
2.Or other solution is Open the .JMX directly into notepad and from there copy the post data into other notepad++ instance and form there with some manipulation you can do correlation.
3.Hope you already changed the property "view.results.tree.max_size=0" in "jmeter.properties" file because may be for next correlation you will get the message like "Response data is to Large".
I had also faced the same issue several times in past, so in that case just copy the complete post body and paste it into notepad++ and modify the content there instead of modifying in jmeter itself, then paste the content back to jmeter and execute it.
This will resolve your issue but have patience while clicking on http request to copy the post body because it'll take some time to open the request properly
I have found out the solution for the very big request for which meter is getting hanged. The best solution is to take the request from the html body of the view result tree listener for the recorded original one and paste in the payload of a new sampler. Then add it in appropriate place accordingly. We can also keep a raw request and make the correlation changes there itself instead of messing around in the big request payload.

jQuery ajaxcall - is there a better way to find the ajaxcaller..?

In my app, I am initiating 30 to 40 ajax calls on load. I got an issue with one of that ajax response..
But i unable to find the where that call is initiateda and called (response).. is there any way to stop the calls and find each of them with their caller details..
please bear with me, in case my question is meaning less.. still i am looking for some idea..
I just looking for the last caller of this screen shot.
As per my understanding, you're looking for fine way to debug the ajax. You can't debug the response but it is possible to check the what are the call made using Firebug or network tab in Google developer tools.
Using this you can easily find the call requested to server and remove the unwanted ajax calls.

Chrome GET request cancels and restarts continously

I am trying to play an mp4 video on my website using window.location = path-to-file/file-name.mp4 through Chrome. Although the video plays, Chrome Developer Tools Network tab shows that that the request continuously gets cancelled and resent:
.
I have left the Developer Tools window open and it has shown that more than 5000 requests have been made and over 600 MB transferred :
It's beyond me why this is happening. I have tried looking at the the request and response headers for the first 4 requests to see if I could spot something obvious (I am by no means an expert):
and the only thing I can see is that the RANGE and CONTENT-RANGE in the request and response headers, respectively, seems to be changing. I also noticed that the very first response has TRANSFER-ENCODING set to CHUNKED.
I tried researching these terms but was not able to come to any conclusions (except the one that I still have a lot to learn, haha). If anyone could please provide any help or point me in the right direction I would be most appreciative :)
Thanks for your help!
EDIT : I would like to add that I am not explicitly creating a GET request with XMLHttpRequest, just using window.location to play the video in a new window.

Chrome XmlHttpRequest Hanging

When I make a XmlHttpRequest (via jQuery's $.ajax) to a particular URL, my Chrome consistently hangs every time with a status on the request of 'Pending'.
After that Chrome must be closed ie. forcibly from Task Manager, and it exhibits general signs of mayhem such as the Cookies and Scripts tabs being empty when they were full of normal looking data immediately prior.
This is odd because (a) my coworkers, running a seemingly identical everything, have no such problems; (b) I have been using Chrome to run this code (our company's JavaScript app) for many months and this just started happening for no apparent reason.
I checked out the Apache logs, they appear to be processing the request normally and to completion, but Chrome never sees the reply, apparently.
A couple of other clarifications: prior to the failure, the same Chrome and Apache return a truckload of JS and image files normally, eg., things seem to be fine right up until they aren't. The request is not particularly large (a few hundred bytes in and out) or complex in any obvious way.
If anybody can give me some hints of where to look, I'd be grateful!
I'm experiencing similar behavior with slightly different symptoms. My ajax requests work fine, every second request up to 6 requests, then they all start failing (same url as when working, same payload, etc), but in my case they're not even hitting the server, just stuck in "Pending" in Inspector.
I dont have an answer for you, but to help debug, have you tried chromes net-internals?
Point your browser at:
chrome://net-internals/#sockets
and/or
chrome://net-internals/#events
I see my requests in #sockets go into "active", but never come back, and in #events I can see that the request stalls after the HOST_RESOLVER_IMPL_REQUEST stage.
I'm thinking it could be a resource issue caused by not properly ending the request, but thats just pure speculation.

Firebug report is blank for a period of time... (performance improvement)

I am trying to optimize my webpage using firebug on firfox. However, i am puzzled by the Net report generated for this page : http://67.20.122.201/boikeno/ebookindex.php?isbn=9781429960625&title=Red%20Dragon%20Rising:%20Edge%20of%20War
There seems to be a period of no activity on this report (no javascript seems to be getting uploaded during this period either)
Any help would be highly appreciated. I am following instructions given here to optimize this page:
https://developers.google.com/speed/docs/best-practices/payload#DeferLoadingJS
It looks like the last component fetched in the main sequence (on the left) is the Javascript through your combine.php handler (link). So, the delay is likely due to the browser parsing that Javascript (which is probably pretty quick), and then any time spent by the script itself.

Resources