The 10Web Website Booster plugin enhances your website's performance. However, occasionally it may conflict with certain JavaScript (JS) files on your website, leading to functionality issues.
Important:
This guide is for more advanced users who are familiar with working with JavaScript. If you are not familiar or are a beginner, we recommend using the One Click Exclusion feature in the advanced settings of the 10Web Booster.
This guide will navigate you through three different scenarios:
- When there are Uncaught TypeErrors in the console
- When there are no errors, but the plugin or theme is not functioning correctly
- When there's an issue with a third-party service's JS
Important:
Before starting with any scenario, you need to open both optimized and non-optimized versions of your website.
How to open the non-optimized version of your website
- Launch your website in Google Chrome
- Add ?two_nooptimize=1 to the end of your website's URL to open the non-optimized version of your webpage
For example, change www.example.com to www.example.com?two_nooptimize=1, then press Enter.
Dealing with uncaught TypeErrors in the console
Identify error messages
- Right-click anywhere on your optimized webpage and select Inspect
- Navigate to the Console tab
Error messages related to problematic JS files will display.
- Specifically, look for Uncaught TypeError: XYZ is not a function or or Uncaught ReferenceError: XYZ is not defined
These errors indicate an issue with a specific JS function or variable.
Exclude the problematic function
- Go to the 10Web dashboard > Website Booster > Settings
- In the Exclude JavaScript File field, enter the function name, in this case XYZ, causing the error
- Save your changes
If the Uncaught TypeError of the optimized version has changed with another uncaught type error, you should exclude that new function as well. If the same Uncaught TypeError persists after excluding the function, you will need to identify the JS file that contains this function and exclude it.
Here's how:
- Copy the function name from the error message
- Open the non-optimized version of your webpage
- Right-click anywhere on your non - optimized webpage and select Inspect
- Navigate to the Sources tab
- Click CTRL+SHIFT+F on Windows (CMD+OPTION+F on Mac) and paste the function name into the search field
This way, you'll see in which JS files the function is called
- Copy the js file names where the function is called i.e. example.js
- Paste them into the Exclude JavaScript File field of the 10Web Booster Settings
- Save your changes
Specific errors and exclusions
- If you encounter Uncaught TypeError: e.indexOf is not a function or Uncaught ReferenceError: wp is not defined, you should exclude wp-includes/ in the Exclude JavaScript File field.
- If you encounter an Uncaught ReferenceError: jQuery is not defined error message, exclude jquery.min.js.
Plugin or theme is not functioning properly
If there are no errors in the console, but your theme or plugin is not working as expected, or the issue has not resolved by simply excluding some js files:
- Navigate to Website Booster > Settings > One Click Exclusions
- Identify and select the checkbox next to the problematic plugin/theme to exclude it from optimization
- Save your changes
Important:
Often the issue can be caused by the builder plugin/theme your website uses. If the issue persists, you should exclude the builder plugin/theme as well.
Problem with third-party service JS
If a third-party service is not functioning correctly on your website:
- Navigate to the non-optimized page where the third-party service should function
- Right-click and select Inspect
- Navigate to the Network tab
- In the Filter bar, click on .js to display only JavaScript files
- Reload your webpage
- In the Name column, look for .js files related to the third-party service
Quick tip:
The name or URL of these files often includes the service's name. For example, for a service called ThirdPartyService, you might see a file named thirdpartyservice.js. Please be aware that the JavaScript file name may be abbreviated or presented in the form of a slug. You can hover over the JS file to view the complete name.
Once identified:
- Go to the 10Web dashboard > Website Booster > Settings
- In the Exclude JavaScript File field, enter the js file name, in this case thirdpartyservice.js, causing the error
Important:
If there are multiple JS files loading from the same external source, we recommend that you exclude all its files using its main URL. For example, if the URL of all external JS files of the third party service begin with https://externalsource.com/, this is its main URL and this is what you should exclude.
- Save your changes
By following these steps, you can exclude any problematic JS files or functions, ensuring your website runs smoothly.
Note:
Every website is unique and may have different JS files or functions that need to be excluded. If you're still facing issues after following these steps, try a lower level of optimization.