Uptrends transaction monitors always open a browser to simulate user activities to check your website performance. The browser starts without any cached data. As it performs user activities (such as logging in, scrolling through products, and adding to cart) on your website, it temporarily stores cache to recognize all your website resources. This speeds up the browser’s loading process the next time it visits the same page.
There are cases where you want to monitor different page behaviors when visiting a page. If you want to compare the behavior of your e-commerce site when loading items in the shopping cart for existing users (with cached data) compared to new visitors (without cached data), we recommend you clear the browser cache.
Clear browser cache action
The Clear browser cache action in your transaction steps empties the browser cache to reload page elements directly from the server instead of the browser cache. This feature helps you check the website’s first-time visit performance and ensures that UI elements (such as images, text, and other front-end elements) are loaded correctly.
Add Clear browser cache action
There are two ways to add the Clear browser cache action in your transaction steps: the Transaction step editor or the Transaction script editor .
Using the Transaction step editor
To add the Clear browser cache in the Transaction step editor:
- Go to .
- Click the transaction monitor to which you want to add the clear browser cache action.
- Go to the Steps tab.
- Go to the Step section you want to add the clear browser cache action.
- Click the button.
- In the Add action popup, select Clear browser cache.
- Click Select.
- In the Settings > Description field, provide a detailed description of the added action.
- Click the button to confirm the monitor changes.
Using the Transaction script editor
To add the Clear browser cache in the Transaction script editor:
- Go to .
- Click the transaction monitor to which you want to add the clear browser cache action.
- Go to the Steps tab.
- In the right corner of your screen, click the button.
- In the Transaction script, add the following
clearCache
snippet to theactions
array:
{
"clearCache": {
"description": "Provide a step description here"
}
},
- Click the button to confirm monitor changes.
The Clear browser cache is now part of your steps and executes every time your transaction monitor runs.