簡單的測試了一下IE前進和後退的過程.
依次訪問網站A,B,C,D.
後退至 B,
然後重新請求網站E,
則記錄的保存順序則是 A,B,E
C,D將會從記錄列表中刪除.
下面看代碼(以下操作均在內存中進行):
一個History對象,用來生成一個記錄對象,該對象包含 url,title,Html三個屬性.
class History
{
private string Title_ = "";
private string WmlSource_ = "";
private string Url_ = "";
public string Title
{
get { return Title_; }
set { Title_ = value; }
}
public string WmlSource
{
get { return WmlSource_; }
set { WmlSource_ = value; }
}
public string Url
{
get { return Url_; }
set { Url_ = value; }
}
public History()
{
}
public History(string t, string w, string u)
{
Title_ = t;
WmlSource_ = w;
Url_ = u;
}
}