---
updatedAt: 2025-06-09T23:38:14.000Z
agentTools:
  projectIndex: https://support.speedcurve.com/llms.txt
---

# Setting localStorage values for a page

```curl cURL
// Disable recording
logData 0
navigate    %URL%

// Set the local storage entries for User Centrics
// Values for these can be found in the Application tab in Chrome DevTools
exec    localStorage.setItem('name', value)
exec    localStorage.setItem('name', 'value')

// Clear the page and it's event handlers
exec    document.open()
// Clear the browser cache
clearCache

// Enable recording
logData 1
navigate    %URL%
```

```json Response Example
{"success":true}
```

# Disable recording and load the page being tested

<!-- curl@1-3 -->

%URL% will be replaced by the actual URL listed in the form field above

# Set localStorage entries

<!-- curl@5-8 -->

The Applications panel in Chrome DevTools is a good way to see what entries scripts  like 3rd-party cookie consent managers are setting

# Clear the current page

<!-- curl@10-11 -->

This removes the current page and event handlers associated with it

# Clear the browser cache

<!-- curl@12-13 -->

Only works in Chrome

# Enable recording and load the page

<!-- curl@15-17 -->