Swift Settings: General tab

You are here:
Estimated reading time: 7 min

General 

Purchase Key – Optionally you can set your purchase key, after this you will be able to update the plugin from WordPress admin, and you will be able to use the Pro features, such as Unlimited Image Optimizer, Critical Fonts and Whitelabel. You can find your purchase key in the purchase confirmation e-mail. You can also login to https://swiftperformance.io and find your purchase key in subscription details, in My Account > Subscriptions. This feature is available only in Pro version.

Disable Cookies – Regarding GDPR you can’t use some cookies until the visitor approve them. In that case you can prevent Swift to create these cookies by default, and use swift_performance_cookies-disabled filter to override this option. Please note that Swift uses cookies for Google Analytics Bypass, and Appcache.

Hide Footprints – Prevent to add Swift Performance response header and HTML comment at the footer of page source. This feature is available only in Pro version.

Use Compute API – Compute API can speed up CPU extensive processes like generating Critical CSS, or minification. If you specified a valid purchase key you will be able to use the Compute API. It will speed up merging process and decrease CPU usage. Compute API also provides advanced JS minify, which should be used if default JS minification cause issues on your site. Compute API also provides Critical Font option, with that you can reduce font icon files’ size. This feature is available only in Pro version.

Prebuild Booster – If you enable this option it will reduce CPU usage and speed up prebuild process, however it can increase MySQL binlogs if it is enabled.

Disable Admin Notices – After update/activate/deactivate plugin, switch/update theme, or update WordPress core Speed Performance will show notices to clear cache. With this option you can disable these notices (but in some cases you still should clear cache!).

Beta Tester – If you enable this option you will get updates in beta stage. If you’re a customer of Swift Performance, consider joining our Beta Program: you’ll be able to get a look and test our new features before the official release! Just opt-in to be a Beta tester and help us and other users. This feature is available only in Pro version.

Debug Log – If you have any issues (eg caching/image optimizer is not working) you can start debugging here. You can enable debug logging here. You will see the current day’s logs on the Plugin dashboard, others will be stored in the specified log folder. You can choose the loglevel. It can be All, Warning or Error. All will contain: Notices, warnings and errors. Warning will contain: warnings and errors, and Error will contain: only errors. You can specify a folder where the logs will be saved. You can use a folder outside public html for better security.

Tweaks

Normalize Static Resources – This feauture will remove query strings from static resources like CSS, JS and IMAGES files. Upon testing your website with a tool such as Gtmetrix, Pingdom, or Google’s PageSpeed Insights you may have come across the suggestion to remove query strings from static resources. Query strings are the URLs that you see containing special characters such as “&” and “?”. Scripts and stylesheets can sometimes contain a url with an appended query string in order to identify the version of the assetor for purposes of cache busting. An example of a query string may resemble something like this: /wp-includes/css/style.css?ver=4.4.2

Removing query strings from static resources is important since if they remain, they can cause caching issues. Certain proxy caching servers and even some CDNs cannot cache static assets with query strings, resulting in a large missed opportunity for increased speeds.

Prefetch DNS – DNS prefetching will resolve domain names before a user tries to follow a link, or before assets were loaded. It can decrease full load time, and also speed up outgoing links. Prefetching allows a browser to silently fetch the necessary resources needed to display content that a user might access in the near future. DNS resolution time can lead to a significant amount of user perceived latency. The time that DNS resolution takes is highly variable.  Latency delays range from around 1ms (locally cached results) to commonly reported times of several seconds.

Collect domains from scripts – If this option is enabled, Swift will collect 3rd party domain names from javascript files as well. If it isn’t enabled, it will collect domains only from HTML and CSS. This feature is related to DNS prefetching as described above.

Exclude DNS Prefetch – If you would like to prevent DNS prefetch for a domain you can add it here. This feature is related to DNS prefetching as described above.

Gravatar Cache – WordPress is using Gratar for avatars by default. Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums. nfortunately sometimes these requests are slower than your server. In that case you should cache these pictures to speed up load time.

Custom Htaccess – Swift Performance will add rules to the very beginning of .htaccess. If you would like to put some rules before, you have to use this option. If you have strange URLs in your analytics or you can see that the site redirects to an URL like this: https://www.yoursite.com/wp-content/cache/yoursite.com/desktop/unauthenticated/index.htmlThis is caused by an improper order of htaccess rules. Probably you are using a force SSL or force www/non-www rule in htaccess. Please remove these rules from .htaccess, and insert them here. Try to avoid using SSL plugin for this purpose. An example of a rewrite rule to force http to https:
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

Background Requests – For some AJAX requests we doesn’t need the response (eg post view stats). You can add rules to make this requests run in background, so the browser won’t wait the response. For example if there is a request: /?action=post_view_count you can set action=post_view_count. This feature is available only in Pro version.

Heartbeat

Disable Heartbeat – Allows you to easily manage the frequency of the WordPress heartbeat API with just a few clicks. The heartbeat API can be disabled entirely and allowed for only specific locations. Heartbeat intervals can be modified between 10 and 300 seconds between requests, saving on server resources. Why would you want to change the default heartbeat intervals?

If you commonly leave your WordPress admin up for long periods of time, especially while writing or editing a post, the repeated POST requests can cause high resource usage. To avoid this, the heartbeat can be modified or even disabled to lower your server resource usage. Disable heartbeat can be applied to the following parts:

Cronjobs

Limit WP Cron – Prevent WP Cron being called on every page load. On some sites the owner disabled wp cron, because by default after every pageload it runs, and if there  are too many visitors, it can generate unnecessary load on the server. If you completely disable it, the scheduled posts and some other stuffs (like swift prebuild) won’t work. here you can set a limit so it won’t run on every visit
With this feauture you can still have wp crons and decrease load.  The right value depends on the number of your visitors
For most sites 100 is fine But if you have 1000 visitor per a day and only daily crons, 10% can work as well. If you have 300 visitors per day and have hourly crons, you shouldn’t limit it at all.

Enable Remote Cron – If all of your pages are cached – or if you disabled the default WP Cron – WordPress cronjobs won’t run properly. With Remote Cron service you can run cronjobs daily, twicedaily or hourly. This feature is available only in Pro version.

Google Analytics

Bypass Google Analytics – If you enable Bypass Analytics feature Swift will block the default Google Analytics script, and will use AJAX requests and the Google Analytics Measurement protocoll instead. Also if you want to gain 100 performance rating on Google Pagespeed Insights, then you’ll definitely need to use this feauture, otherwise you’ll get a warning.

Best practice is to add the Tracking Code to your (Theme)header.php file and paste the tracking code you just copied from your Analytics profile before the closing </head> tag, then Swift will block the default Google Analytics script, and will use AJAX requests and the Google Analytics Measurement protocoll instead.

or, just set Swift Performance Bypass Google Analytics feature to add your Google Analytics Tracking code (UA-XXXXX-Y).
If it isn´t working or you see incorrect data, there is no other solution, then disable the GA Bypass feature. In terms of speed, it won´t hurt.

IMPORTANT: If your Google Analytics script is installed using Google Tag Manager, this feature will not work. Bypass Google Analytics only work with the tracking code taken from a Google Analytics Account.

Tracking ID – Add your google analytics ID here. An example of Google Analytics ID –> eg. UA-XXXXX-Y.

IP Source – If you are using reverse proxy (like Cloudflare) you will need to set the IP source for Google Analytics. If your site is behind Cloudflare and Swift is unable to detect, you should set HTTP_CF_CONNECTION_IP.

Swift usually automatically detect the correct IP source, but we also provide the opportunity to override this, if it is necessary. Usually it shouldn’t be touched, but it will depend on the server environment.

By default REMOTE_ADDR contains the visitor’s IP, but behind proxy it will be the proxy’s IP, and depending on the environment the real visitor IP will be appended in a different header

Anonymize IP – In some cases, you might need to anonymize the user’s IP address before it has been sent to Google Analytics. If you enable this option Google Analytics will anonymize the IP as soon as technically feasible at the earliest possible stage. To learn more about how IP anonymization works, read the IP Anonymization in Google Analytics article.

Delay Collect – If you enable this option Google Analytics requests will be send only after the user made a mouse move, keypress or scroll event. It will speed up initial loading time, but be careful, bounce rate statistics may will be distorted.

Exclude Users from Statistics – You can exclude logged in users from Analytics by user role. It can be extremly useful for smaller sites to see real stats, because editors won’t affect the statistics when they check the site. Exclude users can be applied to the following roles:

This feature is available only in Pro version.

Whitelabel

Whitelabel  provides you the ability to rename and re-brand the Swift plugin for your client site installations. Whitelabel isn’t for everyone, but it gives you options. Whitelabel can help you deliver your optimization services within a personal and unique brand. Instead of your clients seeing our Swift Performance plugin, they’ll see your plugin. They won’t be aware of the middle-man and it’ll help to round out your service offering, making it more professional and holistic.

When you don´t see the Whitelabel tab and you are sure you ticked the “Advanced view” button in the right above corner of Swift dashboard, you may need to (re)activate whitelabel,  this you can do with adding following line in your wp-config.
define(‘SWIFT_PERFORMANCE_WHITELABEL’, false);

Then return to your dashboard en reload the page with shift+F5. Please be aware, that if you make changes to one of these fields, it never may an empty field!

This feature is available only in Pro version.

Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Malcare WordPress Security