By default Glimpse injects its scripts just before the closing </body>
tag. The result of this is that the AJAX calls done on page load are not captured. I am using $(document).ready()
to invoke the AJAX.
Is there a configuration option or placeholder string to put in my Layout.cshtml that would instruct Glimpse to load before my init scripts?
Edit - the request on page load does show up when I open the full Glimpse view under Ajax tab. But it does not increase the Ajax counter on the small overlay display. Any requests that are further initiated slightly in the success handler of the first request do increase the counter. So maybe the problem is somewhere else?
There is no option that you can configure to determine where Glimpse will render its script tags, the script tags will, like you mentioned, be rendered right before the
</body>
tag, this to minimize the impact of the Glimpse client while loading the rest of the page. This injection is also done, independently of you using ASP.NET MVC or ASP.NET WebForms for instance.On the other hand, the issue you are mentioning is already known on the Glimpse issue tracker and is being worked on, so don't hesitate to give additional feedback over there.