Hello Daniel,

Anatoly Kaverin wrote:

We need to get an image physical size (not dimentions) from Web page
loaded into Firefox browser.

Is it possible to get it via XPCOM without additional reloading???

From
chrome\browser\content\browser\metaData.js
function getSize(url) {
try
{
var cacheEntryDescriptor = httpCacheSession.openCacheEntry(url,
Components.interfaces.nsICache.ACCESS_READ, false);
if(cacheEntryDescriptor)
return cacheEntryDescriptor.dataSize;
}
catch(ex) {}
try
{
cacheEntryDescriptor = ftpCacheSession.openCacheEntry(url,
Components.interfaces.nsICache.ACCESS_READ, false);
if (cacheEntryDescriptor)
return cacheEntryDescriptor.dataSize;
}
catch(ex) {}
return -1;
}
Daniel

Thanx, Daniel for your help.
Good luck.

With Best Regards,
Anatoly Kaverin, http://www.vengine.com
C O M O D O group
[EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to