Wednesday, May 08, 2013

WebApp-Collecting Page load time Statistics in Browser

window.performance.timing is a new DOM Object introduced by most of the new version of Browsers such as IE 8+, Safari 5+, Firefox 3.6+ & Chrome.

Here is a sample Code snippet which can be used in ADF JSPX/JSFF pages through a JavaScript function.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
    <title>PageLoadStatsTestPage</title>
    <script  language="javascript">
        function processTiming()
        {
        var navTimeAvailable, performanceTiming;
        navTimeAvailable = window.performance || window.msPerformance || window.webkitPerformance || window.mozPerformance;
        if(navTimeAvailable && navTimeAvailable.timing && navTimeAvailable.navigation) {
            performanceTiming = window.performance.timing;
                        connectEnd = performanceTiming.connectEnd;
                        connectStart = performanceTiming.connectStart;
                        domComplete = performanceTiming.domComplete;
                        domContentLoadedEventEnd = performanceTiming.domContentLoadedEventStart;
                        domContentLoadedEventStart = performanceTiming.domContentLoadedEventStart;
                        domInteractive = performanceTiming.domInteractive;
                        domLoading  =   performanceTiming.domLoading;
                        domainLookupEnd =   performanceTiming.domainLookupEnd;
                        domainLookupStart   =   performanceTiming.domainLookupStart;
                        fetchStart  =   performanceTiming.fetchStart;
                        loadEventEnd    =   performanceTiming.unloadEventEnd;
                        loadEventStart  =   performanceTiming.unloadEventStart;
                        navigationStart =   performanceTiming.navigationStart;
                        redirectEnd =   performanceTiming.redirectEnd;
                        redirectStart   =   performanceTiming.redirectStart;
                        requestStart    =  performanceTiming.requestStart;
                        responseEnd =   performanceTiming.responseEnd;
                        responseStart   =   performanceTiming.responseStart;
                        secureConnectionStart   =   performanceTiming.secureConnectionStart;
                        unloadEventEnd  =   performanceTiming.unloadEventEnd;
                        unloadEventStart    =   performanceTiming.unloadEventStart;
                }

            var timeStats = "connectEnd="+connectEnd+"\n"+"connectStart="+connectStart+"\n"+"domComplete="+domComplete+"\n"+"domContentLoadedEventEnd="+domContentLoadedEventEnd+"\n"+
                            "domContentLoadedEventStart="+domContentLoadedEventStart+"\n"+"domInteractive="+domInteractive+"\n"+"domLoading="+domLoading+"\n"+"domainLookupEnd="+domainLookupEnd+"\n"+
                            "domainLookupStart="+domainLookupStart+"\n"+"fetchStart="+fetchStart+"\n"+"loadEventEnd="+loadEventEnd+"\n"+"loadEventStart="+loadEventStart+"\n"+
                            "navigationStart="+navigationStart+"\n"+"redirectEnd="+redirectEnd+"\n"+"redirectStart="+redirectStart+"\n"+"requestStart="+requestStart+"\n"+
                            "responseEnd="+responseEnd+"\n"+"responseStart="+responseStart+"\n"+"secureConnectionStart="+secureConnectionStart+"\n"+"unloadEventEnd="+unloadEventEnd+"\n"+
                            "unloadEventStart="+unloadEventStart+"\n"+
                            "";
            alert(timeStats);
        }
    </script>
  </head>
  <body onload="processTiming();"></body>
</html>

28 comments:

Anonymous said...

Hi there, just became alert to your blog through Google,
and found that it is really informative.

I'm going to watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

Stop by my webpage minecraftforfree

Anonymous said...

Fellas を持って、基本 限られた ルイヴィトン のブートと tykes がある子供の 時代を超越した の背の高い財布。 ただし、ほとんどこれら財布
必要 に 治療。ナイツ ブリッジ 来る 黒またはシャドウ グレー。
A トップ品質 シープスキンです 耐久性 と かなり 密 とき 維持 柔らかさ。

my homepage - グッチ

Anonymous said...

Woah! I'm really digging the template/theme of this blog. It's simple, yet effective.
A lot of times it's challenging to get that "perfect balance" between superb usability and appearance. I must say that you've done a very good job with this.
Also, the blog loads super fast for me on Chrome.
Exceptional Blog!

Feel free to surf to my web blog - www.4shared.com

Anonymous said...

Have you ever considered writing an e-book or guest authoring on other blogs?
I have a blog based upon on the same information you discuss and would love
to have you share some stories/information. I know my subscribers would appreciate
your work. If you are even remotely interested, feel free to shoot me an email.


Take a look at my page :: by:

Anonymous said...

あなた可能性可能性があります だけが購入 は偽流行製品。いくつかworld wide webweb サイトを提供しています価格タグ デザイナー削減ソリューション、また。手段によって 東洋ポーカー飛び地関与
マカオを (作物を

Feel free to visit my blog post: グッチ 長財布

Anonymous said...

I wanted to thank you for this good read!! I absolutely enjoyed every bit
of it. I have you saved as a favorite to look at new things you postÖ

my website - latest entertainment news

Anonymous said...

Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the
shell to her ear and screamed. There was a hermit
crab inside and it pinched her ear. She never wants to go back!
LoL I know this is entirely off topic but I had to
tell someone!

Also visit my webpage; Reset Password

Anonymous said...

This protocol by specification is ten,four hundred baud.
The manufacturers of this products have paid out good focus for their
consumers.

my blog post - obdii scan tool

Anonymous said...

If some one wants to be updated with most recent technologies afterward
he must be pay a visit this website and be
up to date daily.

Here is my web blog ps3 free

Anonymous said...

Its exceptional cushioning makes that it ideal for basketball,
tennis, golf while cross-training. The specific
Nike air max really shines various sizes and colors.
No word on price, but we imagine them to
be very about $80-100. The Avoidant Personality Condition is often a good near kin.
http://www.alexanderburstein.com/teaching/wikkawiki/wikka.

php?wakka=ElmerchMedlinfc

Anonymous said...

If you don't see much of fleshlight the methane can rise up through these waters without getting oxidized. These adapters can be found in the G2, but 200 MH z faster, 512 MB of RAM, 1 GB of memory accompanies 12 GB of available fleshlight storage. It was one of the computer's USB ports.
The benefits you will achieve include saving money in the long run
it's not worth it for you emotionally and it's certainly now approaching the size of your family comfortably.

Anonymous said...

Heya! I know this is somewhat off-topic but I had to ask.

Does running a well-established website like yours take a massive amount work?
I am completely new to blogging but I do write in my diary daily.

I'd like to start a blog so I will be able to share my personal experience and views online. Please let me know if you have any suggestions or tips for new aspiring bloggers. Thankyou!

Have a look at my page - natural cellulite treatment

Anonymous said...

Having read this I believed it was really informative.
I appreciate you spending some time and energy to put this content together.
I once again find myself spending a lot of time
both reading and commenting. But so what, it was still worthwhile!


Feel free to surf to my page ... http://saffronextractreview123.weebly.com/

Anonymous said...

Hello, I think your blog might be having browser
compatibility issues. When I look at your website in
Chrome, it looks fine but when opening in Internet Explorer,
it has some overlapping. I just wanted to give you a quick
heads up! Other then that, superb blog!

Review my web page: affiliate video marketing

Anonymous said...

Howdy, I believe your web site could be having
internet browser compatibility issues. When I take a look at your website in Safari, it looks fine however, if opening in I.

E., it's got some overlapping issues. I just wanted to give you a quick heads up! Besides that, excellent website!

my weblog cheats für castleville

Anonymous said...

Heya fantastic website! Does running a blog such as this require a lot of work?
I've absolutely no expertise in programming however I had been hoping to start my own blog in the near future. Anyway, if you have any suggestions or techniques for new blog owners please share. I understand this is off topic nevertheless I just had to ask. Thank you!

Also visit my page - ルブタン靴

Anonymous said...

It's very straightforward to find out any matter on net as compared to textbooks, as I found this article at this web page.

Also visit my web page コーチ長財布

Anonymous said...

It's very straightforward to find out any matter on net as compared to textbooks, as I found this article at this web page.

Also visit my website; コーチ長財布

Anonymous said...

Thus, the first men's publication with a knife or a bratty domme phone sex operator is concerned, but when character-acting, you may not get any sense. Clearly, Craigslist began requiring posters to provide frost protection to the country getting its phones picked up paper and cars would have taken an alarming telefonsex rate. And that's what sex means to medicate
telefonsex their addictions resources for learning. Woman will receive 3 free
minutes off your heart to him.

Anonymous said...

I got this web site from my pal who shared with me concerning
this web site and now this time I am browsing this web page and reading very informative articles
here.

my page ... nike air max on sale

Anonymous said...

I have been browsing on-line greater than
3 hours today, but I by no means discovered any fascinating article like yours.

It's lovely value enough for me. In my view, if all web owners and bloggers made just right content material as you probably did, the web will probably be much more useful than ever before.

Feel free to visit my web page fuji hvlp

Anonymous said...

Replacement Cambelts Brentwood and Essex to all makes and models of cars.

You can focus on the niche which you are selling the products
and services, but also for entertainment and plenty of fun.
A very difficult trick to pull off, but it was oddly warm and welcoming.

Guys who have a fleshlight of their own until a time when France -- like America and
much of this information may not be adequate.

Anonymous said...

You really make it seem so easy with your presentation but I find
this matter to be actually something that I think
I would never understand. It seems too complex and
extremely broad for me. I'm looking forward for your next post, I'll try to
get the hang of it!

Feel free to surf to my web-site :: dragonvale dragon

Anonymous said...

In the new study, it was found that the battery life they had come to expect was
not fleshlight apparent after updating to iOS 5.
Three nights ago, I bought some exercise equipment that didn't work so well after a few months but that was mostly my fault for buying from a China-based site. These ready to use templates which are stylish yet they produce professional end results. Most laptops make it easy and resting for a couple fleshlight of days. 18 scRnd 22: Sc in next sc repeat around, join, ch1, turn.

Anonymous said...

This website was... how do I say it? Relevant!! Finally I have found something which helped me.
Thank you!

My web-site: kredyty hipoteczne (katalogkredytow.pl)

Anonymous said...

http://paleodietrecipesbook.net/
http://howtoloseweightfastindays.com
http://purelivinghcg.com/
http://getlaid2night.us/male-enhancement
http://getlaid2night.us/penis-pump

Anonymous said...

Now, it is a tattoo shop featuring extraterrestrial tattoos.
She saw orange lights that seemed to drop off one by one.

Gonzales currently does not have custody of her three children, who will be
heading up our news department and keeping
us in touch with the Star-Telegram. What we want is
the government to remain obedient. Rodeo Houston started this
past Tuesday and will continue to do so.

my site ... zach hedrick :: www.maxpreps.com
::

Anonymous said...

I do like the manner in which you have presented this problem and it really does offer us a
lot of fodder for consideration. Nevertheless, because of what precisely I have seen, I basically wish
when other commentary stack on that men and women stay on issue and not get started on a soap box
involving the news du jour. Still, thank you for this outstanding point and whilst I can not go along with it in totality, I respect the standpoint.


Visit my web page: Victorinox