> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.stylishcostcalculator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# WP Rocket: Fixing JavaScript errors on pages with Stylish Cost Calculator

Follow the steps to fix JavaScript errors on frontend pages cached/optimized by WP Rocket and has 'Stylish Cost Calculator' forms.

## Method 1:
### Go to WP Rocket Settings

![Navigate to WP Rocket settings](https://storage.crisp.chat/users/helpdesk/website/c5f0153cc3f4b000/image_r128bv.png)

### Exclude Stylish Cost Calculator Files
If you use Stylish Cost Calculator Premium, use the following pattern in the exclusions list

```bash
/wp-content/plugins/stylish-cost-calculator-premium/assets/js/(.*).js
/wp-content/plugins/stylish-cost-calculator-premium/dist/frontend/(.*).js
```

![Exclude Files](https://storage.crisp.chat/users/helpdesk/website/c5f0153cc3f4b000/image_1bnnh0b.png)

If you are using Stylish Cost Calculator free version, use the following

```bash
/wp-content/plugins/stylish-cost-calculator/assets/js/(.*).js
```

## Method 2: 
### Exclude Calculator Page Cache
To avoid any potential issues with WP Rocket, we recommend avoiding caching pages that have a calculator. You can use the "Never Cache This Page" option to avoid caching from your page editor.
![](https://storage.crisp.chat/users/helpdesk/website/c5f0153cc3f4b000/screenshot-2025-03-03-at-92037_nuyuly.png)