当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > Check if a File is in Internet Explorers Cache

ASP.NET
合理的网盟广告策略:如何规划与投放网盟广告
GoDaddy Backorder域名抢注经验分享
Google Analytics获得GOOGLE真正的收录网站数据指标
Visual Studio 2008 Team Suite简体中文正式版- 激活方法

ASP.NET 中的 Check if a File is in Internet Explorers Cache


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 42 ::
收藏到网摘: n/a

Description
This function can be called to determine if a file is in Internet Explorers cache. CodePrivate Declare Function GetUrlCacheEntryInfo Lib "wininet.dll" Alias _ "GetUrlCacheEntryInfoA" _ (ByVal sUrlName As String, _ lpCacheEntryInfo As Any, _ lpdwCacheEntryInfoBufferSize As Long) As LongFunction Cached(ByVal strURL As String) As Boolean Dim buffer As Long If (GetUrlCacheEntryInfo(strURL, ByVal 0&, buffer)) = 0 Then If (Err.LastDllError = 122) Then Cached = True End Function
Example Usage
Just call the function and give it the url of the file you want to check:MsgBox Cached("http://msdn.microsoft.com/")