当前位置: 首页 > 工具软件 > WPtouch > 使用案例 >

worpdress缓存插件对wptouch的兼容设置

晋安国
2023-12-01

以下是wptouch的官方解决方法:
Caching software is used to improve the performance of your website. Unless the caching software has been specifically developed for use with mobile devices, it may override WPtouch Pro and give the appearance that your mobile theme is not functioning. You may see:
Cached posts and pages using your desktop theme on mobile devices, and/or
Cached posts and pages using your mobile theme on desktop devices.
Inconsistency of theme when your site is refreshed.

Fortunately, most caching plugins and services may be optimized for mobile use by disabling caching when mobile devices are detected.
BraveNewCode’s Infinity Cache extension may be used in conjunction with other caching plugins or may be used as a replacement for traditional caching plugins. When using a separate caching plugin, disable the setting to “Create cache for desktop users” in Infinity Cache. Be sure to follow these setup guidelines for best performance of your caching plugin.

W3 Total Cache

The following instructions should be performed in the W3 Total Cache settings pages.

If “Browser Cache” enabled, disable “Set expires header” in the Browser Cache settings to prevent desktop/mobile switch link issues.
Go to the “Page Cache” settings under the “Performance” tab.
Copy the list of mobile user agents found in the list of user agents found below.
If you have added support for additional mobile devices in WPtouch Pro’s Compatibility > Custom User Agents field, you must also include those user agents in the “Rejected User Agents” area in W3 Total Cache.
Scroll down to the “Rejected User Agents” field and paste the list of WPtouch default user agents, adding one per line.
Save your changes.
Go to the “Minify” settings under the Performance tab.
Scroll down to the “Rejected User Agents” field and paste the list of WPtouch default user agents, adding one per line.
Save your changes.
Go to the “CDN” settings under the Performance tab.
Scroll down to the “Rejected User Agents” field and paste the list of WPtouch default user agents,adding one per line.
Save your changes.
Finally, go to the W3 Total Cache “Dashboard” and select “Empty All Caches”.
Ensure that W3 Total Cache is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

iPhone
iPod
Android
BB10
BlackBerry
webOS
IEMobile/7.0
IEMobile/9.0
IEMobile/10.0
MSIE 10.0
iPad
PlayBook
Xoom
P160U
SCH-I800
Nexus 7
Touch

WP Super Cache

The native support for the free version of WPtouch found in WP Super Cache (under the “Plugins” tab) must be disabled to prevent conflicts in WPtouch Pro.

In the Advanced tab of the WP Super Cache settings select “Mobile Device Support”* and click “Update Status”.
Still in the Advanced tab, scroll down to the “Rejected User Agents” area. Paste the entire list of mobile user agents found below and click “Save UA Strings”.
If you have added support for additional mobile devices in WPtouch Pro’s Compatibility > Custom User Agents field, you must also include those user agents in the “Rejected User Agents” area in WP Super Cache.
In the “Contents” tab, click “Delete Expired” and “Delete Cached” to delete pages that were likely cached before adding the new list of rejected user agents.
Ensure that WP Super Cache is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

iPhone
iPod
Android
BB10
BlackBerry
webOS
IEMobile/7.0
IEMobile/9.0
IEMobile/10.0
MSIE 10.0
iPad
PlayBook
Xoom
P160U
SCH-I800
Nexus 7
Touch

Wordfence

Go to the “Performance Setup” in the Wordfence settings and select “User-Agent Contains”. Enter the user agents in the user agent list found below one at a time.
Then, select “Cookie Name Contains”, enter “wptouch_switch_toggle” (without quotes) and click the “Add Exclusion” button
Ensure that Wordfence is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))
Click on the “Clear the Cache” button to remove any previously cached files.

WP Rocket

In the “Basic Options” of WP Rocket’s settings page, make sure “Enable caching for mobiledevices.” is deselected.
Ensure that WP Rocket is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

Hyper Cache

In the “Bypasses” tab, select “Devices (user agents) to bypass”
Add the user agent list below.
Click the “Clean the whole cache” button to remove any previously cached files
Ensure that HyperCache is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

iPhone
iPod
Android
BB10
BlackBerry
webOS
IEMobile/7.0
IEMobile/9.0
IEMobile/10.0
MSIE 10.0
iPad
PlayBook
Xoom
P160U
SCH-I800
Nexus 7
Touch

Quick Cache Pro (ZenCache)

In the Quick Cache Pro options, expand “User-Agent Exclusion Patterns” and enter the list of mobileuser agents found below and click the Save Changes button.
Click on the “Clear” button in the top right of the Quick Cache Pro settings page.
Ensure that Quick Cache (Pro) is selected in the plugins list in the Core Settings > Compatibility > WordPress Plugins section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

iPhone
iPod
Android
BB10
BlackBerry
webOS
IEMobile/7.0
IEMobile/9.0
IEMobile/10.0
MSIE 10.0
iPad
PlayBook
Xoom
P160U
SCH-I800
Nexus 7
Touch

WP Simple Cache / WP Green Cache

This plugin is not in active development and does not include options to exclude user agents. Please use a cache plugin in active development.

WPEngine

Please contact WPEngine’s support team and ask them to exclude the user agents found below.

iPhone
iPod
Android
BB10
BlackBerry
webOS
IEMobile/7.0
IEMobile/9.0
IEMobile/10.0
MSIE 10.0
iPad
PlayBook
Xoom
P160U
SCH-I800
Nexus 7
Touch

Autoptimize
Enable the Advanced settings in Autoptimize.
Add webapp.js in the “Exclude scripts from Autoptimize” field
Click the “Save changes and Empty Cache” button
Ensure that Autoptimize is selected in the plugins list in the Compatibility section of the WPtouch Pro admin panel. (Pro only, enabled by default in WPtouch (free))

Sucuri

The latest version of the Sucuri Scanner plugin no longer includes caching functionality.

Other Caching Plugins or Services
In general, caching may be disabled for mobile devices by instructing the plugin or service not to cache pages nor serve cached pages when devices on the WPtouch Pro list of mobile user agents are encountered. If there is no “rejected user agents” area or similar, contact the plugin’s developer or the service’s support department for assistance.
If you have added additional mobile user agents to WPtouch Pro, be sure to include those when optimizing for mobile use.

 类似资料: