开发者 | |
---|---|
更新时间 | 2023年1月25日 01:03 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.0.2 |
版权: | GPL v2 or later |
版权网址: | 版权信息 |
wp_enqueue_script()
and wp_enqueue_style()
. When detecting an external URL, that file is saved to your uploads-folder and served from there.
It also scans the contents of CSS files for external dependencies and also saves those files to your uploads-folder!
Heads-up: For technical reasons, we cannot scan the contents of JS files for such dependencies - JS files can always inject external assets
No Output Buffer:
This plugin does not add any "output buffering" but scans the URLs which are enqueued via recommended WordPress functions.
As a result, GDPR Cache Scripts & Styles has practically no performance impact on your response time, no matter how big your website is.
Background worker:
To speed up your website's loading time, all assets are downloaded in a background process: When a new asset is detected, or a cached file expires, a worker-task is enqueued.
The queue is then processed in an asynchronous process; while the queue is processed, your website could still serve the external assets for a while - usually the queue is processed within one or two minutes.
3. Options Page
You'll find the plugin options page at "Tools > GDPR Cache". On that page you can refresh and purge your website's cache.
Here you can also review a full list of all files that are locally cached, and review the expiration date of each file - when a file expires, the plugin downloads a new version of it from the remote server.
Additionally, when you deactivate the plugin, the entire cache is purged (all files are deleted and relevant DB values are reset)
4. Tested with
We've tested this plugin with the following themes and plugins:
Yes, activate this plugin, and you're done. We tested this plugin on numerous websites with different themes, and it was able to detect and cache all Google Fonts automatically.
Unfortunately, no. Some scripts (such as Google Maps scripts) will load external assets that cannot be detected or cached by this plugin.
If you're using the Divi Theme, you need to disable the Theme Option "Improve Google Fonts Loading". You can find that option in wp-admin > Divi > Theme Options > General > Performance When this option is enabled, this plugin cannot detect the Google Fonts, and your website will make some external requests to load those font-files. Screenshot: divi-config.png
Common reasons are:
Yes. When used in a multisite network, each site will start to create its own GDPR cache
Thanks for the feedback everyone! If you have any questions of encounter problems, let me know.1.0.6