# This action occurred while the window was in the background

**URL:** <https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-sessions\
**Created:** [April 25, 2024, 4:06pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303 "2024-04-25T16:06:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swati\_Bhat](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Swati\_Bhat](https://community.dynatrace.com/u/Swati_Bhat)\
**Post date:** [April 25, 2024, 4:06pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/1 "2024-04-25T16:06:47Z")

</div>

Hello!

I am seeing this in waterfall analysis. Does any one know what does it mean?

Thanks in Advance..

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 25, 2024, 4:44pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/2 "2024-04-25T16:44:13Z")

</div>

Hi!  
I think you missed the attachment, or it failed to load. Can you reupload it?

---

<div class="post-metadata">

**Author:** ![Swati\_Bhat](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Swati\_Bhat](https://community.dynatrace.com/u/Swati_Bhat)\
**Post date:** [April 25, 2024, 4:49pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/3 "2024-04-25T16:49:54Z")

</div>

here is the screenshot -

 ![Swati_Bhat_0-1714063781893.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/476668bde8a7e6ab0d6fb1b98d4f1e9436221190.png)

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 25, 2024, 4:55pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/4 "2024-04-25T16:55:37Z")

</div>

Is this a mobile or web session?

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 25, 2024, 5:04pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/5 "2024-04-25T17:04:19Z")

</div>

If we’re talking about web, it means exaclty that “This action occurred while the window was in the background”.

For instance, in Firefox, you’d have the&nbsp; **Document.visibilityState** flag,&nbsp;bg=1 meaning the window is in a background state.

[Document: visibilityState property - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState).

In some cases, you might get a message like:

```markup
The browser went into the background while the action was active. Timings might not be 100% accurate due to reduced timer resolution

```

---

<div class="post-metadata">

**Author:** ![Swati\_Bhat](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Swati\_Bhat](https://community.dynatrace.com/u/Swati_Bhat)\
**Post date:** [April 26, 2024, 5:05am UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/6 "2024-04-26T05:05:18Z")

</div>

Hi Eric ,

Thanks for helping with the details . This data is from a mobile device using a browser based application.

Needed some more understanding - This background activity is only being seen when resposne time of this user action is extremely high. So what does it actually mean that the activity is being perfromed in background.

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 29, 2024, 10:12pm UTC](https://community.dynatrace.com/t/this-action-occurred-while-the-window-was-in-the-background/45303/7 "2024-04-29T22:12:05Z")

</div>

Hi Swati, so your mobile application is opening a webview inside the app?

Seems like the problem here is that the WebView component is being opened inside the mobile app and the end-user might be switching between apps or minimizing it and causing the&nbsp;Document.visibilityState flag change from visible to hidden.

It might be worth checking if any action during the loading of those resources has conditions based on visibility changes, such as pausing animations, stoping background task or freeing resources for usage optimization that might be reflecting on high duration of your user actions.
