example.comにウェブサイトがあるとしましょう
「データベース」と「年」の2つのローカルビューが含まれています
最初に、データベースビューがロードされます。
ユーザーは「年」ビューに移動します。
アドレスバー(少なくともAndroid 2.3では)はexample.com#Yearと表示されるようになりました
次に、ユーザーは何らかの理由でページを更新することを決定します。
アドレスexample.com#Yearが更新され、ユーザーは空白の白い画面で迎えられます。
この状況に対処する方法について誰か提案がありますか?もちろん、ユーザーがどちらのビューを表示していても、更新された場合は表示したいと思います。
ありがとう!
アップデート:
これが私の問題を説明するのに役立ついくつかのコードです:
html:
<div data-role="view" id="Database">
<div data-role="content">
<p><strong>This is the Database view</strong></p>
<a data-role="button" id="databaseButton" href="#Year">Go to Year View</a>
</div>
</div>
<div data-role="view" id="Year">
<div data-role="content">
<p><strong>This is the Year view</strong></p>
<a data-role="button" id="yearButton">Refresh Page</a>
</div>
</div>
脚本:
var app = new kendo.mobile.Application($(document).body, {
initial: "Database"
});
$("#yearButton").click(function() {
// location.reaload();
// cannot simulate page refresh by the user in jsfiddle
// the current browser address is example.com/index.html#Year
// reloading this address produces a blank white screen
// because of the #Year parameter
});