Documentation

Welcome to the Glimpse Documentation! Here we hope to introduce you to the various tutorials, concepts and APIs you might need when discovering and using Glimpse.

NOTE: Glimpse docs are currently being improved. If you'd like to help out, just edit this page or contribute to our GitHub Wiki

Ajax Tab

The Ajax tab shows a list of Ajax requests handled by your application. Click the 'Inspect' link on any request to see additional Glimpse diagnostics data.

When you click 'Inspect' on a request, the request URL is shown in the status bar at the top of the Glimpse.

Ajax Tab

Background

By default the Glimpse panel shows information about the web page currently shown in your browser. It is likely that your page contains JavaScript that makes further requests to the server using Ajax. Because this is happening in the background and no new page is loaded in the browser, the Glimpse panel does not show information about those requests.

The Ajax tab comes to the rescue. In its initial state it displays basic information about every Ajax call that is made on the page. While the plugin based tabs are static after the page has been loaded, the Ajax tab is updated every time an Ajax request is executed.

To learn more about a particular Ajax request, click on the 'Inspect' link at the right end of the panel. This will change the context of the Glimpse panel from the original web page request to the Ajax request itself. Now all the other tabs are showing the information about the Ajax request. When you done investigating the Ajax request, you can 'Inspect' another one from the list or return to the page content by clicking the 'Reset context back to the starting page' link.

The Ajax request currently looked at is highlighted in yellow.

Layout

  1. Request URL: The URL that was accessed by the Ajax request
  2. Status: Status of the resulting response from the server
  3. Date/Time: Date time of the request
  4. Duration: Approximate duration of the request
  5. Is Async: Whether the request was async/sync
  6. Inspect: Allows you to select the request you wish to inspect

Frequently Asked Questions

  • What happen to my Ajax requests after I leave the page?

    Its important to remember that by default Glimpse remembers the last 15 requests that where made to the server. This goes for both non ajax requests and ajax requestions alike. Hence, even after you leave a page (when normally you may think your requests are lost) you can go to the remote tab to pull up these previous requests.

  • I'm seeing requests my requests crossed out, what does this mean?

    This means the request was identified as a Ajax request (we do this by looking for an http header "X-Requested-With" with the value "XMLHttpRequest" in the request) but for some reason Glimpse did not provide the debug data on the server. This may be because you are using a Content-Type other that text/html in your Ajax calls. Many people use JSON or XML as there content type. To enable Glimpse for such requests add the following to the Glimpse configuration node:

Example:

<contentTypes>
   <add contentType="text/html" />
   <add contentType="text/xml" />
   <add contentType="application/json" />
</contentTypes>

How does it work

While for a normal page request, Glimpse adds the "debug data" to the end of the page, this is not possible for an Ajax request.

Instead it saved the debug information for the request on the server and creates a unique Id to identify it. This Id is then send to the browser in the http header of the Ajax response. The Glimpse client side component picks up that Id and issues a new request to the server to get the debug information. When you click the 'Inspect' link it re-fills the Glimpse panel with the information of the Ajax request.