HTML Dropdown

Wednesday, 17 June 2015

10 brainstorming questions to help find your purpose


The purpose of life is to live it, to taste experience to the utmost, to reach out eagerly and without fear for newer and richer experience.The human race is a monotonous affair. Most people spend the greatest part of their time working in order to live, and what little freedom remains so fills them with fear that they seek out any and every means to be rid of it.It does not matter how long you are spending on the earth, how much money you have gathered or how much attention you have received. It is the amount of positive vibration you have radiated in life that matters.Human beings are so destructive. I sometimes think we're a kind of plague, that will scrub the earth clean. We destroy things so well that I sometimes think, maybe that's our function. Maybe every few eons, some animal comes along that kills off the rest of the world, clears the decks, and lets evolution proceed to its next phase.Give time, give space to sprout your potential. Awaken the beauty of your heart – the beauty of your spirit. There are infinite possibilities.You keep waiting for the moral of your life to become obvious, but it never does. Work, work, work: No moral. No plot. No eureka! Just production schedules and days. You might as well be living inside a photocopier. Your lives are all they're ever going to be.
It can be very challenging to try and uncover your purpose at any given time in your life. God knows I have struggled with uncovering mine at times. Please find 10 questions below that have helped many of my clients and me begin to bring to light our true purpose. Food for thought, the way I like to think about your purpose is that it will give you the fuel to feed your passion.
Please answer the following questions as best you can.
  1. Why do you want a career for purpose?
  2. What do you love to do at work?
  3. What are you doing when you feel most alive/beautiful?
  4. What is your favorite hobby?
  5. What did you love to do when you were 13?
  6. What is always in the back of your mind?
  7. Was there a career (or part of the job) that your parents do/did that you loved? If so, what is/was it?
  8. What community/population do you love to serve/support?
  9. What problems do you love to solve?
  10. What would you like to stop doing?
Want more questions? Still a bit confused? Contact me on my blog for more questions to find your purpose.
To your impact!
"Most people stop searching for their dream job way before they should because something in their brain says it’s too painful to continue.When your heart and mind are connected to a larger purpose you are on your true path to success."

Tuesday, 16 June 2015

Performence mesurement of website: Part2



You could also use Fiddler which will work for browsers other than Firefox. (But will not profile javascript code)

HTTP Performance: An Overview

It's no secret—users love fast Web sites. Users are notoriously impatient, and unless your Web site has no competitive substitute, users are unlikely to stick around if your site's performance doesn't measure up. If your site has visitors from around the world, ensuring your site operates efficiently is even more critical, as international network connections generally suffer from the twin banes of snappy sites: high latency and low bandwidth.
There are many options for improving your site's performance: compression, caching, geographic load balancing, adding hardware, and so forth. Optimizing the use of compression and caching is often the best place to start, as configuration changes are generally free and can return dramatic benefits.
In this article, we'll use the Fiddler HTTP Debugger to explore HTTP performance, caching, and compression.

Tweaking "First Visit" Performance

On their crucial first visit to your site, visitors must download every piece of content used to generate the page, including JScript, CSS, images, and HTML. If your page is too slow to load, visitors may leave your page before it's even done downloading!
By exposing all HTTP traffic, Fiddler readily shows which files are used to generate a given page. Shift+click multiple entries in the HTTP Sessions list to calculate the "total page weight"—the number of requests and the bytes transferred.

Figure 1. Fiddler's Performance Statistics View
The best way to ensure a "Wow, this is fast" first impression is to deliver fewer and smaller files.
Tips for fast first-visits:
  • Use fewer graphics.
  • Extract styles into a single CSS file.
  • Extract script blocks into a single JS file.
  • Simplify your page layout.
  • Use HTTP Compression.
Once you've tuned your site for a fast first visit, you can make it even faster for return visitors by taking advantage of HTTP caching.

Introduction to HTTP Caching

Two key factors in improving the speed of your Web applications are:
  • Reducing the number of request/response roundtrips.
  • Reducing the number of bytes transferred between the server and the client.
HTTP caching is of the best ways to reduce roundtrips and bytes transferred. Caching provides a mechanism for a client or proxy to store HTTP responses for later use, so that requests need not cross the network.
Other than performance, another benefit of maximizing use of HTTP caching comes from the fact that bandwidth isn't free. By tuning caching for a major Microsoft site, we were able to reduce our outbound bandwidth costs by over $10,000 per month.

Cache-Related Request Headers

To enhance performance, Microsoft Internet Explorer and other Web clients maintain a local cache of resources downloaded from remote Web servers.
When a resource is needed by the client, there are three possible actions:
  • Send a plain HTTP request to the remote Web server asking for a resource
  • Send a conditional HTTP request to the origin server asking for the resource only if it differs from the locally cached version
  • Use a locally cached version of the resource, if a cached copy is available
When sending a request, the client may use one of the following headers:
Table 1. Client Cache Headers
Pragma: no-cache
The client is unwilling to accept any cached responses from caches along the route and the origin server must be contacted for a fresh copy of the resource.
If-Modified-Since: datetime
The server should return the requested resource only if the resource has been modified since the date-time provided by the client.
If-None-Match: etagvalue
The server should return the requested resource if the ETAG of the resource is different than the value provided by the client. An ETAG is a unique identifier representing a particular version of a file.
A client indicates that it has a cached response available for use by sending a "Conditional request" containing the headers If-Modified-Since or If-None-Match. If the server replies to a conditional request with HTTP/304 Not Modified, the client is directed to reuse its cached response. Otherwise, the server should return a new response and the client should discard its outdated cache item.
Observe two consecutive requests for an image file in the following code sessions. In the first session, no locally cached version of the file is present, so the server returns the file along with an ETAG value and the date-time of the last modification of the file. In the subsequent session, a locally cached version of the file is now available, so a conditional request is made, passing up the ETAG of the cached response as well as the Last-Modified time of the original request. Since the image has not changed since the cached version (either because the ETAG matches or the If-Modified-Since value matches the Last-Modified value) the server returns a 304 to the client to direct it to use the cached response.
Session #1
GET /images/banner.jpg HTTP/1.1
Host: www.bayden.com
 
HTTP/1.1 200 OK
Date: Tue, 08 Mar 2006 00:32:46 GMT
Content-Length: 6171
Content-Type: image/jpeg
ETag: "40c7f76e8d30c31:2fe20"
Last-Modified: Thu, 12 Jun 2003 02:50:50 GMT
Session #2
GET /images/banner.jpg HTTP/1.1
If-Modified-Since: Thu, 12 Jun 2003 02:50:50 GMT
If-None-Match: "40c7f76e8d30c31:2fe20"
Host: www.bayden.com
 
HTTP/1.1 304 Not Modified
Because an HTTP/304 response contains only headers and no body, it crosses the network much more quickly than if the full resource had been re-downloaded. However, even an HTTP/304 requires a full roundtrip to the remote Web server; by carefully setting response headers, a Web application developer can eliminate the need to issue even conditional requests.

Cache-Related Response Headers

Generally, the cacheability of an HTTP response is controlled by headers sent in the response. The HTTP specification describes the headers that control caching. The optional Cache-Control and Expires headers are the primary mechanisms for a Web server to indicate to a proxy or a client how content may be cached.
The Expires header contains an absolute date-time after which a cached copy of a response should no longer be considered fresh. If the Expires header contains something other than a date (0 or -1 are common values), the response should immediately be treated as stale. A fresh cache entry may be reused without contacting the server again; a stale cache entry should not be reused without first contacting the Web server to ensure that it is still up-to-date.
For example, let's look at the previous example, except we'll add an Expires header to the first response:
Session #1
GET /images/banner.jpg HTTP/1.1
Host: www.bayden.com
 
HTTP/1.1 200 OK
Date: Tue, 08 Mar 2006 00:32:46 GMT
Content-Length: 6171
Content-Type: image/jpeg
Expires: Tue, 12 Jun 2007 02:50:50 GMT
Last-Modified: Thu, 12 Jun 2003 02:50:50 GMT
Session #2
<no HTTP request is made; cached version is used automatically>
As you can see, we've improved performance by adding an Expires header, since no conditional HTTP request is made during Session #2.
Similarly, the Cache-Control header contains a list of tokens that control caching. Any Cache-Control directives supersede the Expires header.
Commonly used Cache-Control tokens include those found in table 2.
Table 2. Common Cache-Control Headers
Value
Meaning
public
The response may be stored in any cache, including caches shared among many users.
private
The response may only be stored in a private cache used by a single user.
no-cache
The response should not be reused to satisfy future requests.
no-store
The response should not be reused to satisfy future requests, and should not be written to disk. This is primarily used as a security measure for sensitive responses.
max-age=#seconds
The response may be reused to satisfy future requests within a certain number of seconds.
must-revalidate
The response may be reused to satisfy future requests, but the origin server should first be contacted to verify that the response is still fresh.
Using the HTTP Sessions list, Fiddler users can see whether pages contain HTTP Caching headers.


Figure 2. Fiddler Sessions List
If a response does not contain Expires or Cache-Control headers, the client may be forced to issue a conditional request to ensure that the resource is still fresh.

Conditional Requests and the WinInet Cache

Internet Explorer takes advantage of the caching services provided by Microsoft Windows Internet Services (WinInet).
WinInet allows the user to configure the size and behavior of the cache. To access the cache settings:
  1. Open Internet Explorer.
  2. On the Tools menu, choose Internet Options.
  3. On the General tab, in the Temporary Internet Files box, click Settings.
At the top of the Settings dialog box, there are four choices.


Figure 3. Internet Explorer Cache Options
The vast majority of users leave the setting at the default of automatically.
The most important fact to keep in mind is that these four options mostly impact the behavior when there are no caching headers on the HTTP responses; when caching headers are present, Internet Explorer will always respect them. The following table describes the impact of these settings on request behavior.
Table 3. Cache behaviors
Setting
Cache copy is fresh
Cache stale
No cache-directives were present
Every visit to the page
No request
Conditional request
Conditional request
Every time you start Internet Explorer
No request
Conditional request
Conditional request
Automatically
No request
Conditional request
Heuristic (see below)
Never
No request
Conditional request
No request
Cached content is considered fresh if the request is made during the freshness lifetime specified by the Cache-Control or Expires headers on the original response. Cached content is considered stale if the request is made after the end of the freshness lifetime specified.
The automatically setting bears some explanation—how can WinInet know if the cached resource is fresh when no caching directives were provided on the server's HTTP response?
The answer is that WinInet can't know for sure and a Heuristic process is followed to make a "best guess" effort. In the automatically state, the Heuristic will issue a conditional request unless all of the following criteria are met:
  • The cached resource bears a Content-Type that begins with image/.
  • The cached resource has a Last-Modified time.
  • The URL to the cached resource does not contain a question mark (hinting that it's a CGI request).
  • The cached resource has been conditionally requested at least once within the most recent 25 percent of its overall age in the cache.
If all of the criteria above are met, no request is made.
As a Web developer, you should always ensure that you send appropriate caching headers to guarantee you get optimum cache behaviors.

Flagging Performance Problems

You can use Fiddler's Custom Rules to draw attention to potential performance problems. For instance, you can flag any response larger than 25KB.
To add this rule, click Rules and then Custom Rules, and add the following code inside the OnBeforeResponse event handler:
// Flag files over 25KB
   if (oSession.responseBodyBytes.length > 25000){
      oSession["ui-color"] = "red";
      oSession["ui-bold"] = "true";
      oSession["ui-customcolumn"] = "Large file";
   }
Similarly, you can flag responses that do not specify caching information:
   // Mark files which do not have caching information
if (!oSession.oResponse.headers.Exists("Expires") &&
!oSession.oResponse.headers.Exists("Cache-Control")){
      
oSession["ui-color"] = "purple";
      oSession["ui-bold"] = "true";
   }

Introduction to HTTP Compression

All popular Web servers and browsers offer support for HTTP Compression. HTTP Compression can dramatically decrease the number of bytes that are transmitted between the server and the client; savings of over 50 percent for HTML, XML, CSS, and JS are common.
A Web browser signals to the server that it is willing to accept HTTP compressed content by listing the supported compression types in the request headers. For instance, consider the following request to the new MSN Search homepage:
GET / HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: search.msn.com
The Accept-Encoding header indicates Internet Explorer is willing to accept responses that have been compressed using either the GZIP or DEFLATE formats.
The MSN Search server obligingly returns the compressed contents; the Content-Encoding response header indicates the GZIP format was used:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0 --Microsoft-HTTPAPI/1.0
X-Powered-By: ASP.NET
Vary: Accept-Encoding
Content-Encoding: gzip
Date: Tue, 15 Feb 2006 09:14:36 GMT
Content-Length: 1277
Connection: close
Cache-Control: private, max-age=3600
Using Fiddler, you can decompress the response using the Transformer tool on the Session Inspector tab.


Figure 4. Transformer Inspector before decompressing GZIP'd response
Click the No Compression radio button to decompress the response inside Fiddler. Compression reduced the number of bytes transferred by over 57 percent.


Figure 5. Transformer Inspector after decompressing response
The savings are more dramatic for the common.css file used by the MSN Search homepage; the CSS file was compressed 81 percent (from 25,288 bytes to 4,648 bytes). Note that image files like GIFs, JPEGs, and PNGs generally are already compressed and thus usually are not delivered with HTTP compression.
You can use Fiddler to simulate HTTP compression by checking "Simulate GZIP Compression" on the Fiddler Rules menu.
Enabling compression for static files in IIS has a minimal CPU impact on IIS Web servers, because the files are compressed only the first time and then cached on the server. Enabling compression for dynamic files like ASP.NET pages may impact your servers' CPU performance; you'll want to evaluate this performance impact before enabling dynamic compression on production Web servers.

Winning the Performance Battle

Improving HTTP efficiency is only half of the challenge; if your Web application itself is slow, it won't matter how efficient your HTTP traffic is.

Performance Measurement Website:Part 1

Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf
Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf
Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf




I love to Cook. Cooking is a precise science, so I learned early on that I needed different measurement tools if I wanted to avoid demoralizing kitchen fails. See-through Pyrex cups for measuring liquids or melting butter in the microwave. Measuring scoops in a variety of sizes for dry ingredients. Scales if I’m following a European recipe. Just like there’s no one-size-fits-all measurement tool in my kitchen, there’s no miraculous all-purpose tool for measuring the performance of your website.
It always happens. Our websites get to be too slow. We keep adding features and graphics, and JavaScript doodads on our sites, and the website performance slows to a crawl. That’s an embarrassment for any web developer, especially one that is proud of creating responsive sites. Before you can speed up the website, you have to figure out exactly what’s causing the bottleneck. The first step in any sort of performance optimization is to know what is running slowly and using up resources. Fortunately, many tools are available to help you with this measurement task.
In our industry, there’s a lot of language around how we time website speed. We tend to assume that outsiders understand our language, but something I read recently indicates that the average person doesn’t. We need to fix that.
A couple of weeks ago, I came across this article written by Luxury Daily writer Rachel Lamb: Luxury marketers dramatically drop site loading times. Given our own research into web performance and luxury markets here at Strangeloop, my curiosity was piqued.
The article made this statement, based on a recent report by SmartBear:
The average luxury site’s load time went from 2.6281 seconds in the third quarter to 1.321 seconds in the fourth quarter of 2011.
Looking at the results made me laugh and cry:
Home page
Load/response time
(as cited in article)
Rolls-Royce
0.169
Porsche (US)
0.256
Jaguar (US)
0.260
Mercedes-Benz (US)
3.405
Ferrari (US)
4.585
Infiniti (US)
4.154
Prada (US)
0.170
Cartier
0.244
Calvin Klein
3.742
Burberry (US)
3.548
Hugo Boss (US)
0.658
Given that the ideal load time is 2 seconds or less, this is a good-looking set of numbers — too good-looking. I did a little research of my own via WebPagetest.* the three new columns are mine.
Home page
Load/response time
(as cited in article)
First byte
Start render
Load time
Rolls-Royce
0.169
0.788
2.712
13.339
Porsche (US)
0.256
0.187
0.766
4.760
Jaguar (US)
0.260
0.538
1.098
10.722
Mercedes-Benz (US)
3.405
0.380
2.274
9.507
Ferrari (US)
4.585
0.483
1.409
2.831
Infiniti (US)
4.154
0.909
2.849
15.528
Prada (US)
0.170
0.723
10.800
12.142
Cartier
0.244
0.175
0.740
1.340
Calvin Klein
3.742
0.316
0.540
0.786
Burberry (US)
3.548
0.408
2.020
6.364
Hugo Boss (US)
0.658
0.353
3.593
6.425

What do these numbers mean?

If you’re a relative newcomer to the performance scene and the tables above looks like numerical gibberish, it’s not your fault. I’ll get into the terminology later in this post. For now, suffice to say that there’s a lot of variance in these numbers.
So, you have response time, time to first byte, start render time, and load time. Which set of numbers do you rely on to answer the #1 question site owners ask:
How fast does my site load for real users?
The short answer is: None of them, totally.
The long answer is: It’s complicated. Keep reading.

If you can’t trust numbers, what can you trust?

Numbers in a spreadsheet are a good way to spot larger patterns and trends, but if you want to get a ground-zero look at your site’s performance, capturing videos and filmstrip views of your pages’ load times are one of the best ways to go.
To illustrate, let’s take a closer look at two of the top-performing sites, according to this article: Prada and Rolls-Royce.
Remember that, in the luxury website performance article, Prada was lauded as having one of the fastest sites, with a response time of 0.17 seconds? While the response time may have been quick, there’s a serious problem at the network level. If you view Prada’s page load as a filmstrip (a nifty WebPagetest feature that I don’t think gets talked about enough), you see that, from a user’s perspective, nothing happens on the page until around 10.5 seconds, which roughly correlates to the start render time of 10.8 seconds.
You can also output the filmstrip to a video:
If you view the filmstrip for Rolls-Royce, you see that nothing starts to happen until around 3 seconds, again correlating roughly to the start render time of 2.712 seconds. This might sound acceptable on paper, but note that the feature banner doesn’t load till after the 11-second mark. An eye tracking study by usability expert Jakob Nielsen found that delaying banner load by 8 seconds resulted in the banner being virtually ignored when it finally showed up.

Four key performance measurement terms explained (so that normal people can understand them)

First, I want to be straight about the fact that I don’t think SmartBear was trying to mislead anyone with their numbers. Without knowing how SmartBear defined “response time” in their tests, it’s impossible to comment on their results. Because of this vagueness, I think Ms. Lamb has made two understandable mistakes — mistakes I encounter frequently when I talk about performance outside the geek zone:
  • Using “response time” and “load time” interchangeably.
  • Not realizing that “response time” can mean any number of completely different things.
There isn’t a lot of effort to educate the lay public — such as journalists, and even customers — about what these terms mean. To address this problem, here’s a simple guide to understanding fundamental website performance measurement terms, and when and why you should care about each.

Response time

What it means: Response time is incredibly tricky, and it causes a lot of the confusion I encounter. It can refer to any number of things, depending on whom you ask: server-side response time, end-user response time, HTML response time, time to last byte with no bandwidth/latency, and on and on. Long story short: There’s no single definition.
Caveats: If someone starts talking to you about response time, ask them to clarify which response time they mean. Be wary of anyone who tries to sell you on the idea that there’s only one definition. If user experience matters to you, ask how whatever type of response time you’re looking at relates to what the end user actually sees.
When it’s useful: Different types of response time measurements tell you different things, from the health of your back end to when content starts to populate the browser. As I’ve already said — and it bears repeating — you need to know what you’re measuring and why.

Time to first byte

What it means: Time to first byte is measured from the time the request is made to the host server to the time the first byte of the response is received by the browser.
Caveats: Time to first byte doesn’t really mean anything when it comes to understanding the user experience, because the user still isn’t seeing anything in the browser.
When it’s useful: For detecting back-end problems. If your website’s time to first byte is more than 100 milliseconds or so, it means you have back-end issues that need to be examined. (Web performance consultant Andrew King has written a good post about this, as has Google performance expert Pat Meenan.)

Start render

What it means: As its name suggests, “start render” indicates when content begins to display in the user’s browser. This term seems to have evolved as an alternative to “end-user response time”, but it’s not yet widely used outside of hardcore performance circles.
Caveats: Doesn’t indicate whether the first content to populate the browser is useful or important, or simply ads and widgets.
When it’s useful: When measuring large batches of pages, or performance of the same page over time, it’s good to keep an eye on this number. Ideally, visitors should start seeing usable content within 2 seconds. If your start render times are higher than this, you need to take a closer look.

Load time

What it means: The time it takes for all page resources to render in the browser — from those you can see, such as text and images, to those you can’t, such as third-party analytics scripts. (Geek version: “Load time” is also known as “document complete time” or “onLoad time”. It’s measured when the browser fires something called an “onLoad event” after all the page resources have fully loaded. No matter what you call it, it’s used as a primary measuring stick for site performance.)
Caveats: Needs to be taken with a grain of salt, because it isn’t an indicator of when a site begins to be interactive. A site with a load time of 10 seconds can be almost fully interactive in the first 5 seconds. That’s because load time can be inflated by third-party scripts, such as analytics, which users can’t even see.
When it’s useful: Load time is handy when measuring and analyzing large batches of websites, because it can give you a sense of larger performance trends.

Three things to remember:

1.     There’s no single “right” way to measure performance. Each measurement tells you something meaningful about how your site performs.
2.     You need to understand the different performance measurement terms so that you can interpret your own data. If you don’t, sad to say some people will take advantage of your ignorance to mislead you for their own benefit. (For example, it’s a little-known fact that some performance vendors have convinced site owners to tie bonuses for key employees to backbone test results, which do not measure real-world performance.)
3.     As a matter of due course, you always need to gather large batches of data and rely on median numbers. But you also need to periodically get under the hood and take a real-world look at how your pages behave for real users.
PageSpeed’s scores are based on a number of factors, including how well your scripts are minimized, images optimized, content gzipped, tap targets being appropriately sized and landing page redirects avoided.
With 40% of people potentially abandoning pages that take more than 3 seconds to load, caring about how quickly your pages load on your users devices is increasingly becoming an essential part of our development workflow.

Performance metrics in your build process

Although manually going to the PageSpeed Insights to find out how your scores is fine, a number of developers have been asking whether it’s possible to get similar performance scoring into their build process.
The answer is: absolutely.

Introducing PSI for Node

Today we’re happy to introduce PSI for Node - a new module that works great with Gulp, Grunt and other build systems and can connect up to the PageSpeed Insights service and return a detailed report of your web performance. Let’s look at a preview of the type of reporting it enables:


The results above are good for getting a feel for the type of improvements that could be made. For example, a 5.92 for sizing content to viewport means “some” work can still be done whilst a 24 for minimizing render blocking resources may suggest you need to defer loading of JS using the async attribute.

Lowering the barrier of entry to PageSpeed Insights

If you’ve tried using the PageSpeed Insights API in the past or attempted to use any of the tools we build on top of it, you probably had to register for a dedicated API key. We know that although this just takes a few minutes, it can be a turn off for getting Insights as part of your regular workflow.
We’re happy to inform you that the PageSpeed Insights service supports making requests without an API key for up to 1 request every 5 seconds (plenty for anyone). For more regular usage or serious production builds, you’ll probably want to register for a key.
The PSI module supports both a nokey option for getting it setup in less than a few minutes and the key option for a little longer. Details on how to register for an API key are documented.

Getting started

You have two options for how you integrate PSI into your workflow. You can either integrate it into your build process or run it as a globally installed tool on your system.

Build process

Using PSI in your Grunt or Gulp build-process is fairly straight-forward. If you’re working on a Gulp project, you can install and use PSI directly.

Install
npm install grunt-pagespeed --save-dev
Then load the task in your Gruntfile:
grunt.loadNpmTasks('grunt-pagespeed');
and configure it for use:
pagespeed: {
  options: {
    nokey: true,
    url: "https://www.html5rocks.com",
    strategy: "mobile"
  }
}
You can then run the task using:
grunt pagespeed
Installing as a global tool
You can also install PSI as a globally available tool on your system. Once again, we can use npm to install the tool:
$ npm install -g psi
And via any terminal window, request PageSpeed Insights reports for a site (with the nokey option or an API specific key as follows):
psi http://www.html5rocks.com --nokey --strategy=mobile
or for those with a registered API key:
psi http://www.html5rocks.com --key=YOUR_API_KEY --strategy=mobile
That’s it!
Go forth and make performance part of your culture
We need to start thinking more about the impact of our designs and implementations on user experience.
Solutions like PSI can keep an eye on your web performance on desktop and mobile and are useful when used as part of your regular post-deployment workflow.





Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf
Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf
Your website is undoubtedly one of your most valuable marketing channels for your business and therefore it’s important to know exactly how well it is achieving your goals and where you need to make improvements. - See more at: http://demon.net/blog/monitor-website-performance-5-key-metrics/#sthash.blR6SU4W.dpuf