質問編集履歴

2

スマホのキャッシュを削除したことを記載

2017/06/01 05:58

投稿

ebiPT
ebiPT

スコア15

test CHANGED
File without changes
test CHANGED
@@ -504,6 +504,10 @@
504
504
 
505
505
 
506
506
 
507
+ 念のため、iphoneのキャッシュも全て初期化して再閲覧してみましたが変わりませんでした。
508
+
509
+
510
+
507
511
  状態を確認する必要がある場合は、
508
512
 
509
513
  http://ebi-seitai.com/

1

改善前の\.htaccessを記載

2017/06/01 05:58

投稿

ebiPT
ebiPT

スコア15

test CHANGED
File without changes
test CHANGED
@@ -48,10 +48,14 @@
48
48
 
49
49
  ①.htaccessの初期化
50
50
 
51
+
52
+
51
- 恐らく初期状態かと思わる、以下のよう書き換えまし
53
+ スマホ表示での崩れに気づい時の.htaccess
52
54
 
53
55
  ```
54
56
 
57
+
58
+
55
59
  # BEGIN VA SIMPLE BASIC AUTH
56
60
 
57
61
  <IfModule mod_rewrite.c>
@@ -92,12 +96,402 @@
92
96
 
93
97
 
94
98
 
99
+
100
+
101
+ #ブラウザキャッシュの設定
102
+
103
+ ExpiresActive On
104
+
105
+ ExpiresByType text/css "access plus 1 days"
106
+
107
+ ExpiresByType image/gif "access plus 1 weeks"
108
+
109
+ ExpiresByType image/jpeg "access plus 1 weeks"
110
+
111
+ ExpiresByType image/png "access plus 1 weeks"
112
+
113
+ ExpiresByType application/x-javascript "access plus 1 weeks"
114
+
115
+
116
+
117
+ #フォント
118
+
119
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
120
+
121
+ ExpiresByType application/x-font-ttf "access plus 1 year"
122
+
123
+ ExpiresByType application/x-font-opentype "access plus 1 year"
124
+
125
+ ExpiresByType application/x-font-woff "access plus 1 year"
126
+
127
+ ExpiresByType image/svg+xml "access plus 1 year"
128
+
129
+
130
+
131
+ <IfModule mod_expires.c>
132
+
133
+
134
+
135
+ ExpiresActive on
136
+
137
+ ExpiresDefault "access plus 7 days"
138
+
139
+
140
+
141
+ # CSS
142
+
143
+ ExpiresByType text/css "access plus 1 year"
144
+
145
+
146
+
147
+ # RSS
148
+
149
+ ExpiresByType application/atom+xml "access plus 1 hour"
150
+
151
+ ExpiresByType application/rdf+xml "access plus 1 hour"
152
+
153
+ ExpiresByType application/rss+xml "access plus 1 hour"
154
+
155
+
156
+
157
+ # データはキャッシュさせない
158
+
159
+ ExpiresByType application/json "access plus 0 seconds"
160
+
161
+ ExpiresByType application/ld+json "access plus 0 seconds"
162
+
163
+ ExpiresByType application/schema+json "access plus 0 seconds"
164
+
165
+ ExpiresByType application/vnd.geo+json "access plus 0 seconds"
166
+
167
+ ExpiresByType application/xml "access plus 0 seconds"
168
+
169
+ ExpiresByType text/xml "access plus 0 seconds"
170
+
171
+
172
+
173
+ # Favicon
174
+
175
+ ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
176
+
177
+ ExpiresByType image/x-icon "access plus 1 week"
178
+
179
+
180
+
181
+ # HTML
182
+
183
+ ExpiresByType text/html "access plus 0 seconds"
184
+
185
+
186
+
187
+ # JavaScript
188
+
189
+ ExpiresByType application/javascript "access plus 1 year"
190
+
191
+ ExpiresByType application/x-javascript "access plus 1 year"
192
+
193
+ ExpiresByType text/javascript "access plus 1 year"
194
+
195
+
196
+
197
+ # マニフェスト
198
+
199
+ ExpiresByType application/manifest+json "access plus 1 week"
200
+
201
+ ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
202
+
203
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
204
+
205
+
206
+
207
+ # 画像や動画
208
+
209
+ ExpiresByType audio/ogg "access plus 1 month"
210
+
211
+ ExpiresByType image/bmp "access plus 1 month"
212
+
213
+ ExpiresByType image/gif "access plus 1 month"
214
+
215
+ ExpiresByType image/jpeg "access plus 1 month"
216
+
217
+ ExpiresByType image/png "access plus 1 month"
218
+
219
+ ExpiresByType image/svg+xml "access plus 1 month"
220
+
221
+ ExpiresByType image/webp "access plus 1 month"
222
+
223
+ ExpiresByType video/mp4 "access plus 1 month"
224
+
225
+ ExpiresByType video/ogg "access plus 1 month"
226
+
227
+ ExpiresByType video/webm "access plus 1 month"
228
+
229
+
230
+
231
+ # Webフォント
232
+
233
+
234
+
235
+ # Embedded OpenType (EOT)
236
+
237
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
238
+
239
+ ExpiresByType font/eot "access plus 1 month"
240
+
241
+
242
+
243
+ # OpenType
244
+
245
+ ExpiresByType font/opentype "access plus 1 month"
246
+
247
+
248
+
249
+ # TrueType
250
+
251
+ ExpiresByType application/x-font-ttf "access plus 1 month"
252
+
253
+
254
+
255
+ # Web Open Font Format (WOFF) 1.0
256
+
257
+ ExpiresByType application/font-woff "access plus 1 month"
258
+
259
+ ExpiresByType application/x-font-woff "access plus 1 month"
260
+
261
+ ExpiresByType font/woff "access plus 1 month"
262
+
263
+
264
+
265
+ # Web Open Font Format (WOFF) 2.0
266
+
267
+ ExpiresByType application/font-woff2 "access plus 1 month"
268
+
269
+
270
+
271
+ # Other
272
+
273
+ ExpiresByType text/x-cross-domain-policy "access plus 1 week"
274
+
275
+
276
+
277
+ </IfModule>
278
+
279
+
280
+
281
+ <IfModule pagespeed_module>
282
+
283
+ ModPagespeed on
284
+
285
+ # 画像劣化が気になる場合は画像圧縮をOFFに
286
+
287
+ ModPagespeedDisableFilters rewrite_images
288
+
289
+ </IfModule>
290
+
291
+
292
+
293
+ <ifModule mod_headers.c>
294
+
295
+ Header unset ETag
296
+
297
+ </ifModule>
298
+
299
+ FileETag None
300
+
301
+
302
+
303
+ # Enable Keep-Alive を設定
304
+
305
+ <IfModule mod_headers.c>
306
+
307
+ Header set Connection keep-alive
308
+
309
+ </IfModule>
310
+
311
+
312
+
313
+ # ETags(Configure entity tags) を無視する設定
314
+
315
+ <ifModule mod_headers.c>
316
+
317
+ Header unset ETag
318
+
319
+ </ifModule>
320
+
321
+ FileETag None
322
+
323
+
324
+
325
+ # プロクシキャッシュの設定(画像とフォントをキャッシュ)
326
+
327
+ <IfModule mod_headers.c>
328
+
329
+ <FilesMatch "\.(ico|jpe?g|png|gif|svg|swf|pdf|ttf|woff|woff2|otf|eot)$">
330
+
331
+ Header set Cache-Control "max-age=604800, public"
332
+
333
+ </FilesMatch>
334
+
335
+ # プロキシサーバーが間違ったコンテンツを配布しないようにする
336
+
337
+ Header append Vary Accept-Encoding env=!dont-vary
338
+
339
+ </IfModule>
340
+
341
+
342
+
343
+ # ブラウザキャッシュの設定
344
+
345
+ <IfModule mod_headers.c>
346
+
347
+ <ifModule mod_expires.c>
348
+
349
+ ExpiresActive On
350
+
351
+
352
+
353
+ # キャッシュ初期化(1秒に設定)
354
+
355
+ ExpiresDefault "access plus 1 seconds"
356
+
357
+
358
+
359
+
360
+
361
+ # MIME Type ごとの設定
362
+
363
+ ExpiresByType text/css "access plus 1 weeks"
364
+
365
+ ExpiresByType text/js "access plus 1 weeks"
366
+
367
+ ExpiresByType text/javascript "access plus 1 weeks"
368
+
369
+ ExpiresByType image/gif "access plus 1 weeks"
370
+
371
+ ExpiresByType image/jpeg "access plus 1 weeks"
372
+
373
+ ExpiresByType image/png "access plus 1 weeks"
374
+
375
+ ExpiresByType image/svg+xml "access plus 1 year"
376
+
377
+ ExpiresByType application/pdf "access plus 1 weeks"
378
+
379
+ ExpiresByType application/javascript "access plus 1 weeks"
380
+
381
+ ExpiresByType application/x-javascript "access plus 1 weeks"
382
+
383
+ ExpiresByType application/x-shockwave-flash "access plus 1 weeks"
384
+
385
+ ExpiresByType application/x-font-ttf "access plus 1 year"
386
+
387
+ ExpiresByType application/x-font-woff "access plus 1 year"
388
+
389
+ ExpiresByType application/x-font-woff2 "access plus 1 year"
390
+
391
+ ExpiresByType application/x-font-opentype "access plus 1 year"
392
+
393
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
394
+
395
+ </IfModule>
396
+
397
+ </IfModule>
398
+
399
+
400
+
401
+ # キャッシュを有効にする
402
+
403
+ <Files ~ ".(gif|jpe?g|png|ico)$">
404
+
405
+ Header set Cache-Control "max-age=2592000, public"
406
+
407
+ </Files>
408
+
409
+
410
+
411
+ # キャッシュする有効期限を指定する
412
+
413
+ Header set Cache-Control "max-age=2592000, public"
414
+
415
+
416
+
417
+ # 拡張子によって設定を変える
418
+
419
+ <Files ~ ".(gif|jpe?g|png|ico|otf|ttf|eot|woff)$">
420
+
421
+ Header set Cache-Control "max-age=2592000, public"
422
+
423
+ </Files>
424
+
425
+ <Files ~ ".(css|js|html|gz)$">
426
+
427
+ Header set Cache-Control "max-age=86400, public"
428
+
429
+ </Files>
430
+
431
+
432
+
433
+
434
+
95
435
 
96
436
 
97
437
  SetEnvIf Request_URI ".*" WpLoginNoLimit
98
438
 
439
+
440
+
99
441
  ```
100
442
 
443
+
444
+
445
+ 恐らく初期状態かと思われる設定に、以下のように書き換えました
446
+
447
+ ```
448
+
449
+ # BEGIN VA SIMPLE BASIC AUTH
450
+
451
+ <IfModule mod_rewrite.c>
452
+
453
+ RewriteEngine On
454
+
455
+ RewriteCond %{HTTP:Authorization} ^(.*)
456
+
457
+ RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
458
+
459
+ </IfModule>
460
+
461
+ # END VA SIMPLE BASIC AUTH
462
+
463
+
464
+
465
+ # BEGIN WordPress
466
+
467
+ <IfModule mod_rewrite.c>
468
+
469
+ RewriteEngine On
470
+
471
+ RewriteBase /
472
+
473
+ RewriteRule ^index\.php$ - [L]
474
+
475
+ RewriteCond %{REQUEST_FILENAME} !-f
476
+
477
+ RewriteCond %{REQUEST_FILENAME} !-d
478
+
479
+ RewriteRule . /index.php [L]
480
+
481
+ </IfModule>
482
+
483
+
484
+
485
+ # END WordPress
486
+
487
+
488
+
489
+
490
+
491
+ SetEnvIf Request_URI ".*" WpLoginNoLimit
492
+
493
+ ```
494
+
101
495
  ②追加したプラグインの停止もしくは削除
102
496
 
103
497
 
@@ -120,7 +514,9 @@
120
514
 
121
515
  自分ではどうにも改善策が思いつかず、ずっと嘆いています。
122
516
 
517
+ どうかみなさんお助けください!
518
+
123
- どうかみなさんよろしくお願いします!!
519
+ よろしくお願いします!!
124
520
 
125
521
 
126
522