Hi, I developed a web application using HTML5-Offline Application Cache mechanism. Inspite of deleting the cache as mentioned in the above steps, Firefox still maintains a copy of the page in it's cache. Also, a serious bug is, even though we delete all
Issue
I have a problem with my bookmarks, cookies, history or settings
Description
Hi,
I developed a web application using HTML5-Offline Application Cache mechanism. Inspite of deleting the cache as mentioned in the above steps, Firefox still maintains a copy of the page in it's cache. Also, a serious bug is, even though we delete all temp files used by Firefox, and open the previously cached page, it displays it correctly, but upon refreshing/reloading it again shows the previous version of the page maintained in the cache.
Troubleshooting information
HTML5: Application Caching
.style1 { font-family: Consolas; font-size: small; text-align: left;
margin-left: 80px; }
function onCacheChecking(e) { printOutput("CHECKINGContents of the manifest are being checked.", 0); } function onCacheCached(e) {
printOutput("CACHEDAll the resources mentioned in the manifest have been downloaded", 0); } function onCacheNoUpdate(e) { printOutput("NOUPDATEManifest file has not been changed. No updates took place.", 0); } function onCacheUpdateReady(e) { printOutput("UPDATEREADYChanges have been made to manifest file, and were downloaded.", 0); } function onCacheError(e) { printOutput("ERRORAn error occured while trying to process manifest file.", 0); } function onCacheObselete(e) { printOutput("OBSOLETEEither the manifest file has been deleted or renamed at the source", 0); } function onCacheDownloading(e) { printOutput("DOWNLOADINGDownloading resources into local cache.", 0); } function onCacheProgress(e) { printOutput("PROGRESSDownload in process.", 0); }
function printOutput(statusMessages, howToTell) /** * Outputs information about an event with its description * @param statusMessages The message string to be displayed that describes the event * @param howToTell Specifies if the output is to be written onto document(0) or alert(1) or both(2) */
{ try { if (howToTell == 2) { document.getElementById("stat").innerHTML += statusMessages; window.alert(statusMessages); } else if (howToTell == 0) { document.getElementById("stat").innerHTML += statusMessages; } else if (howToTell == 1) { window.alert(statusMessages); } } catch (IOExceptionOutput) { window.alert(IOExceptionOutput); } } function initiateCaching()
{ var ONLY_DOC = 0; var ONLY_ALERT = 1; var BOTH_DOC_ALERT = 2; try { if (window.applicationCache) { var appcache = window.applicationCache; printOutput("BROWSER COMPATIBILITYSUCCESS!! AppCache works on this browser.", 0); appcache.addEventListener('checking', onCacheChecking, false); appcache.addEventListener('cached', onCacheCached, false); appcache.addEventListener('noupdate', onCacheNoUpdate, false); appcache.addEventListener('downloading', onCacheDownloading, false); appcache.addEventListener('progress', onCacheProgress, false); appcache.addEventListener('updateready', onCacheUpdateReady, false); appcache.addEventListener('error', onCacheError, false); appcache.addEventListener('obsolete', onCacheObselete, false); } else { document.getElementById("stat").innerHTML = "Failure! I cant work."; } } catch (UnknownError) { window.alert('Internet Explorer does not support Application Caching yet.\nPlease run me on Safari or Firefox browsers\n\n'); stat.innerHTML = "Failure! I cant work."; } }
Firefox version
3.6.3
Operating system
Windows XP
User Agent
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729; .NET4.0E)
Plugins installed
- -Shockwave Flash 10.0 r45
- Default Plug-in
- Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
- NPRuntime Script Plug-in Library for Java(TM) Deploy
- The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
- Google Update
- 4.0.50524.0
- Office Live Update v1.4
- NPWLPG
- Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
- Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
- Npdsplay dll
- DRM Store Netscape Plugin
- DRM Netscape Network Object
Thanks & Regards, Kandarpa Chandrasekhar Omkar Software Engineer Wipro Technologies Bangalore. omkar.chandrasekhar@wipro.com kcomkar@gmail.com
Todas las respuestas (3)
Thanks in advance, K Chandrasekhar Omkar kcomkar@gmail.com
Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. http://forums.mozillazine.org/viewforum.php?f=25 You'll need to register and login to be able to post in that forum.
We have had this issue many, many times before including on the latest 3.6 rev. It appears that when the applicationCache has an update triggered by a new manifest file, the browser may still use only its local network cache to check for updates to the files in the manifest, instead of forcing an HTTP request and revalidating both the browser cache and the applicationCache versions of the cached file (seems there is more than one). I have to assume this is a browser bug, as one should not have to frig with server Cache-Control headers and such to get this to work as expected (and even then it still doesn't sometimes).
The only thing that seems to fix the problem is setting network.http.use-cache to false (default is true) in about:config . This helps my case because we only ever run offline (applicationCache driven) apps in the affected browser (our managed mobile apps platform), but it will otherwise slow down your browser experience considerably.