Topics: Optimization

Questions about Swift’s Optimization section.

You are here:

What does “threads” mean?

Nov, 11 34
We can limit the CPU threads/process-workers from 3, 2 or 1 and it means the concurrent CPU threads of optimization. For example if you set the Optimization setting to Optimize in Background, and you have 100 visitors it can start 100 CPU threads if you won’t limit them. Your shared server will prob...

WP Google Maps by WP Google Maps: Merge Scripts breaks Google maps “Missing Key Map Error”

Sep, 9 16
You need to exclude from merge scripts: Settings > Optimization > Scripts > Exclude Scripts (

I get a JavaScript error when I enable minify for scripts

Sep, 9 15
Some 3rd party theme/plugin scripts contain invalid code (eg missing semicolon), which can be fixed by the browser, but if you minify them and multiple commands will be moved into one line it can cause issues. You can notify the 3rd party theme/plugin developer about the issue, however in Swift’s...

Which post types should be excluded?

Sep, 9 17
The autoconfig will detect most post types what should be excluded, however you can also exclude some manually. This feature is good for post types that have a single page but you don’t use: eg forms, snippets, popups, etc. You can can add them manually: Settings > Caching > Exceptions> Exc...

FOUC – I have flash of unstyled content issue

Sep, 9 93
Probably some of your CSS files contains an invalid line (eg unclosed media query), which can break the Critical CSS generation. In most cases it is caused by custom styling, but plugin and theme styles can also cause the issue. Try to exclude files one-by-one from merging: Settings > Optimiza...

Why does Swift still search and find strange pages even if I don’t have it anymore and removed it manually?

Sep, 9 6
Because Swift aggressively searches for every possible custom post type (CPT) slug unlike other cache plugins. It's a plus because it finds CPT's and ensures that they are cached. It can be a negative if it finds many things you don't want to be cached. You can exclude the ones you don't want in the...

When the page first loads, off-canvas modal flashes quickly then disappears

Sep, 9 97
Please disable critical css here: Settings / Optimization / Styles / Generate Critical CSS. 

What if the Critical CSS that is generated is not “critical enough”?

Sep, 9 15
We are continuously improve the plugin, however our current experience is that Critical CSS is as critical as possible.

I got a blank page, or just a simple line (e.g. Copyright 2018)

Sep, 9 30
Some of your JavaScript contains a document.write command. When scripts are combined (especially if Async Execute is enabled) this command can overwrite the content of the whole page. You can simply exclude the problematic script in Settings > Optimization > Scripts > Exclude Scripts ...

I get a 404 message when trying to access my /sitemap_index.xml

Oct, 10 11
Add the word #sitemap# to the exclude URLs list and then to start the Prebuild Cache.