Topics: Optimization

Questions about Swift’s Optimization section.

You are here:

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

Sep, 9 76
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 32
Add the word #sitemap# to the exclude URLs list and then to start the Prebuild Cache.

I still get “Render Blocking CSS/JS” issue in Google PageSpeed Insights

Sep, 9 193
Usually you will get “Render Blocking” issue if the Critical CSS is not enabled, or there is something in the viewport what needs javascript for rendering (eg slider or animated elements). You can enable Disable Full CSS feature, but please note, that some javascript added styles can be missing. ...

How do I exclude a style sheet in a child directory: /wp-content/themes/theme-child/style.css?

Oct, 10 63
You can exclude this specific file by using theme-child/style.css in Settings > Optimization > Styles: Exclude Styles.

Combined CSS or JS file is not compressed

Sep, 9 118
The problem is that the combined CSS or JS file exceeds the max GZIP size limit. Increase the limit to apply compression for these files. If you have issues with the combined CSS, you can also try the Disable full CSS option, but if you do, you should check all pages, because some javascript adde...

How to improve the “Make Fewer HTTP Requests” and optimize “Add Expires headers”?

Oct, 10 490
You can decrease number of HTTP requests if you enable Style & Script merging in Settings > Optimization.  Swift takes care about expires headers, however please note if you are using 3rd party assets they will use their own headers.

What string might be used to exclude all the scripts that loads in the active theme?

Sep, 9 71
You can use URL parts for exclude rules, eg: wp-content/themes/ to exclude all scripts which are loaded from your current theme.

How can I generate critical CSS?

Oct, 10 108
Swift does this automatically. Make sure you have it set properly in Settings > Optimization > Styles > Generate Critical CSS.

Images are blurry or they won’t load

Sep, 9 108
If you enable Lazy load for images it will load a placeholder image (a very small version of the original one, or a 1×1 pixel transparent gif), and load the full image with javascript when it is almost in the viewport. If you have a javascript conflict this may be broken which prevent lazy loader...

First pageload is very slow

Sep, 9 131
Generating Critical CSS can take some time based on your theme and plugins.  To avoid increased first page load times you should enable Optimize Prebuild Only or Optimize in Background features.