procedure TForm1.IECache1Entry(Sender: TObject; var Cancel: Boolean);
begin
listbox1.Items.Add(IECache1.EntryInfo.SourceUrlName);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
IECache1.SearchPattern := spAll;
IECache1.RetrieveEntries(0);
EmbeddedWB1.AssignEmptyDocument;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
IECache1.SearchPattern := spAll;
//e.g.: set SearchPattern:=spCookies if you only want to delete cookies
IECache1.ClearAllEntries;
Listbox1.Items.Clear;
IECache1.SearchPattern := spAll;
IECache1.RetrieveEntries(0);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
Listbox1.Items.BeginUpdate;
try
Listbox1.Items.Clear;
with IECache1 do
begin
case RadioGroup1.ItemIndex of
0: SearchPattern := spAll;
1: SearchPattern := spCookies;
2: SearchPattern := spHistory;
3: SearchPattern := spUrl;
end;
RetrieveEntries(0);
end;
finally
Listbox1.Items.EndUpdate;
end;
end;
function DTString(DT: TDatetime): string;
begin
if DT < 0 then
Result := &#39;&#39;
else
Result := DateTimeToStr(DT);
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
EmbeddedWB1.Wait;
if Listbox1.Items.Count > 1 then
IECache1.GetEntryInfo(ListBox1.Items.Strings[ListBox1.ItemIndex]);
with IECache1.EntryInfo do
begin
if ((pos(&#39;.htm&#39;, Localfilename) > 0) or (pos(&#39;.gif&#39;, Localfilename) > 0) or (pos(&#39;.jpg&#39;, Localfilename) > 0))
and Checkbox1.checked then
EmbeddedWB1.Go(LocalFileName);
Label1.Caption := &#39;Hitrate: &#39; + InttoStr(HitRate);
Label2.Caption := &#39;FileSize: &#39; + InttoStr(FSize);
Label3.Caption := &#39;Last access: &#39; + DTString(LastAccessTime);
Label4.Caption := &#39;Last modified: &#39; + DTString(LastModifiedTime);
Label5.Caption := &#39;Expire: &#39; + DTString(ExpireTime);
edtFileName.Text := LocalFileName;
end;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
Listbox1.SetFocus;
listbox1.ItemIndex := 1;
Listbox1Click(Sender);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
with OpenDlg do
begin
filter := &#39;Internet files|*.htm;*.html;*.gif;*.jpg&#39;;