回答編集履歴
1
history.replaceState()が実装されていないブラウザへのフォールバックを考慮したコードに修正
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[History API](https://
|
1
|
+
[History API](https://caniuse.com/#feat=history)を使用するのはどうでしょうか。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -18,11 +18,11 @@
|
|
18
18
|
|
19
19
|
// ここから追加
|
20
20
|
|
21
|
-
if (history.state === 'visited') {
|
21
|
+
if (!history.replaceState || history.state === 'visited') {
|
22
22
|
|
23
23
|
jQuery("#contact").validationEngine('validate');
|
24
24
|
|
25
|
-
} else
|
25
|
+
} else {
|
26
26
|
|
27
27
|
history.replaceState('visited', location.href);
|
28
28
|
|