Help us understand the problem. What is going on with this article?

wordpressでスマートフォンとPCなどのデバイスを切り分けてキャッシュを実現する方法

More than 5 years have passed since last update.

WordpressプラグインのQuick Cacheを使います。
https://wordpress.org/plugins/quick-cache/

ただし旧版(無料)または新版Pro(有料)を使う必要があります。無料で利用したい方は旧版をインストールする必要があります。

こちらの設定などサイトが詳しいです。
http://www.hirok-k.com/blog/796.html

設定の中で「MD5 Version Salt」がありますが、そこで設定する値を私の場合はAndroidをAndroid.*Mobileに変更しています。AndroidタブレットをPC表示にするためです。

((preg_match("{AdsBot-Google|Android.*Mobile|BlackBerry 9350|BlackBerry 9360|BlackBerry 9370|BlackBerry 9380|BlackBerry 9780|BlackBerry 9790|BlackBerry 9800|BlackBerry 9810|BlackBerry 9850|BlackBerry 9860|BlackBerry 9900|BlackBerry 9930|BlackBerry9500|BlackBerry9520|BlackBerry9530|BlackBerry9550|CUPCAKE|Googlebot-Mobile|bada|dream|froyo|iPhone|iPod|incognito|s8000|webOS|webmate}", $_SERVER["HTTP_USER_AGENT"])) ? "smartphone" : ((preg_match("{DoCoMo/|J-PHONE/|J-EMULATOR/|Vodafone/|MOT(EMULATOR)?-|SoftBank/|[VS]emulator/|KDDI-|UP\.Browser/|emobile/|Huawei/|IAC/|Nokia|mixi-mobile-converter/|DDIPOCKET;|WILLCOM;|Opera Mini|Opera Mobi|PalmOS|Windows CE;|PDA; SL-|PlayStation Portable;|SONY/COM|Nitro|Nintendo}", $_SERVER["HTTP_USER_AGENT"])) ? "featurephone" : ""))

デバイスの切り替えには、Multi Device Switcherを使いテーマを分けています。
https://wordpress.org/plugins/multi-device-switcher/

eversense
家族を幸せにすることで、笑顔溢れる社会をつくる。
https://eversense.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした