Help Center
New to VisionScaper?
Start here
Help Center › Getting started & settings › Caching and minify exclusions
Caching and minify exclusions
Two exclusions that keep VisionScaper working when you use a caching or minify plugin: its JavaScript and its REST routes.
On this page
The readme gives two rules for sites that use a caching or minify plugin.
- Do not combine or minify VisionScaper’s JavaScript. Exclude
assets/js/*.jsin this plugin from JavaScript combining and minification. They are ES modules, which break when merged into one file. - Do not page-cache the VisionScaper API. Exclude
/wp-json/dreamscaper/*from page caching.
Why
The app loads many small JavaScript module files and talks to the server through REST routes. Cached API replies can show the wrong person’s data or stale results. Merged modules stop loading.
Steps
- Open your caching or optimization plugin’s settings.
- Find the JavaScript or “minify/combine” exclusion list.
- Add the path to this plugin’s scripts:
/wp-content/plugins/<plugin-folder>/assets/js/. Use your real folder name. - Find the “never cache URLs” list.
- Add
/wp-json/dreamscaper/(or the pattern/wp-json/dreamscaper/*). - Clear the cache.
- Open your Designer and Hub pages in a private window and click each button.
Other cache points
- Library photos and materials are loaded from lists with a version number added to the address, so a replaced photo should not stay stale. Click Rebuild photo list if you copied files in by FTP.
- If you use a CDN, make sure it also passes
/wp-json/dreamscaper/through uncached.
Tips
- Test after every change to your optimization plugin.
- Exclude the plugin folder from “delay JavaScript” features too if the button stops responding. This is general advice; the readme only names combining and minifying.
If something goes wrong
- Button does nothing or the app is blank. A script is being combined, delayed or minified. Remove it from the optimizer.
- Someone sees old data. The API may be cached. Add the exclusion and clear everything.
- Console shows “unexpected token” or module errors. That points to minified modules.