If layout issues or JavaScript errors occur after enabling CSS/JS minification or combination, specific files may need to be excluded.
33.1 Problem #
After enabling CSS or JS optimization features:
- Layout breaks
- Console errors appear
- JavaScript stops working
Technical Context #
- Minification removes formatting and comments
- Combination merges multiple files into one
- This can affect script execution timing
- May disrupt dependency order or inline scripts
- Third-party plugin assets are especially sensitive
33.2 How to Identify the Problem #
- Open your website in a browser
- Right-click → Inspect
- Go to the Console tab
Look for errors such as:
Uncaught TypeErrorUnexpected tokenReferenceError
Click the error message to identify the file path causing the issue.
33.3 Solution #
Once identified:
- Copy the problematic file path
- Paste it inside the appropriate exclusion field:
- Exclude CSS Files
- Exclude JS Files
These fields are available under:
SpeedyGo → Settings → Asset Optimization
After adding exclusions:
- Clear cache
- Reload the page
- Re-test functionality
33.4 Best Practice Recommendation #
- Exclude only the necessary files
- Test incrementally after enabling features
- Keep combination disabled if using HTTP/2 and no benefit is observed
Selective exclusion ensures stable performance without sacrificing optimization benefits.