24

For public page, I can use pingdom.com to calculate the response time/uptime of a page over a certain period of time.

However, pingdom cannot time the response time of a webpage guarded behind a login page. For example, pingdom cannot check the response time for my Gmail inbox, as I would need to supply my gmail username and password to pingdom if I want that.

Is there anyway I can get the webpage loading time for the webpage that requires a username/password pair?

9
  • Can't you just expose the page publicly for the duration of the test?
    – JCL1178
    Commented Jan 31, 2013 at 7:25
  • This really depends on the type of tool you want to use. Most webservers support the notion http(s)://user:password@server, for example.
    – initall
    Commented Jan 31, 2013 at 7:57
  • 1
    @JCL1178, I can't because those pages are very personalized, in the same sense as the gmail inbox/facebook wall is personalized.
    – Graviton
    Commented Jan 31, 2013 at 8:03
  • @initall, can you elaborate? Most webservers, can you give me any pointers on this?
    – Graviton
    Commented Jan 31, 2013 at 8:03
  • If the document is protected with HTTP BASIC AUTHENTICATION, the embedding of username password is supported by Apache and others. Depends on your setup. Google for phrases like "http basic authentication username password in url".
    – initall
    Commented Jan 31, 2013 at 8:07

7 Answers 7

13

2020 update

The Lighthouse tool is now part of Chrome, and you can access it from Developer Tools (F12) -> Audit. You can use it on logged-in pages, and even against Chrome on a real mobile device (which you should use instead of emulators whenever possible). Lighthouse provides audits for performance, accessibility, progressive web apps, and more.

Here's a 2017 screenshot of Lighthouse auditing a Google Keep note page:

Lighthouse screenshot on logged-in page

In addition to using the extension against logged-in pages, you can do it on the CLI, as well.

2
  • weird they dont mention this on 'depreciated page speed extension page' that we replaced with new name Commented Jul 10, 2017 at 15:11
  • Regarding the 2017 update about lightspeed - it works well for authentication (i.e. page is guarded by authentication) however the port it listens on (when google chrome is opened in debug mode) it only captures the auth sequence and no actions after that. Ideally all the actions done in google chrome should be recorded and simulated since its listening on that port. I am looking for stats on a page which loads after some more actions post auth. But unfortunately that is not happening :(
    – kkk
    Commented Oct 18, 2017 at 0:09
2

You can also install a browser extension such as Yslow or PageSpeed Insights and run the test directly from your browser.

1
  • 5
    Update 2017: Yslow is not maintained and not working anymore. The PageSpeed Plugin for Chrome needs an unprotected website, it does not get along with basic auth.
    – Mateng
    Commented Feb 15, 2017 at 15:18
1

Create a backdoor (just remember to remove it later on!)

For example: Access through page inbox.php?loginForTest=1 will automatically login you as a user with ID 25, or whichever you'd like to use use for test, and load this content without making any further authentication checks.

Assuming you write OOP you'd be able to change just a few lines of code in authentication class to load the content from a certain user perspective if certain GET data is set.

As for HTTP Authentication - you got most of the answers in comments already. Use the @ syntax in URL to login as a user.

If you still won't be able to get through the login form - try to use firebug for more basic tests - just remember to run in several times to get a proper average and don't compare data from firebug with data from pingdom or other similar services as they might have different method of obtaining timings.

2
  • 1
    As a general practice, backdoors are dangerous and I would not recommend them. In this example, if pingdom.com was compromised, someone could have access to the backdoor URLs to access potentially sensistive user information on your site. Commented Jan 31, 2013 at 18:48
  • OOP code doesn't help. Having a site/application/code that works modularly and or accepting parameters do. The backdoor options is a good advice.
    – PatomaS
    Commented Mar 21, 2014 at 7:11
1

Google Analytics now has Site Speed information. You can run the analytics script on logged-in pages and view the results there.

0

One possible approach is to create a backdoor that works only for whitelisted IP addresses. Pingdom's IP range, for example, is available on their site, so you could temporarily allow requests from that IP range through without authentication.

It's possible to spoof the requesting IP address, but since the requester won't receive any data back from your server (it'll be sent to the IP they're spoofing), this approach might be secure enough for your purposes. Of course, it's best not to leave a backdoor open when you don't need it.

0

If what you want to know is response time of the site for a first request, or sever response for starting the handshake, ping is most than enough since that is independent from the content retrieved, the handshake or the headers. It only depends on ICMP requests being allowed.

If you need to calculate loading time, that is different, the best way to do that, and considering that you mention that the page/site is personalized, is to create a page with the same amount and kind of content, create specific no cache rules on your .htaccess and the use whichever tool you want to test response and loading time.

Of course that page has to do the same work that the normal application does, just with non sensitive data, for that, you should create some fake data on the DB id the is any associated, then the page has to be generated with the same server side technology if you are using any for the normal pages and it has to fetch and load the same images.

Of course that is if you want accurate data. If you don't want to do that work, or you don't need data as accurate as the one you will get with that procedure, then you can use tools like ab command from Apache or any other simulation tool.

0

You can use google chrome to do this

Open up the developers tools (Press Command+Option+I (Mac) or Control+Shift+I (Windows, Linux))

Go to the Network tab.

Refresh the page.

You will see a list of every resource that your page loads. Once finished you can see the total time it took to load every resource at the bottom

I have checked this after login at my Gmail. Like this screenshot:

enter image description here There is a "disable cache" option that can be useful to see loading time of the first time a page loads, compared to a repeated visitor.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.