Note that there are some explanatory texts on larger screens.

plurals
  1. POApplication Cache works in Tomcat 6.0 but not in weblogic 10.3
    primarykey
    data
    text
    <p>I'm working with application cache and I'm facing the below issue:</p> <p>In Tomcat Server:</p> <p>When the server is online and if the page is accessed for the first time, the files specified in the manifest file are caught successfully in the application cache.</p> <p>When the server is offline, when we try to access the cached page, there is an error in the browser console (<code>Application Cache Error event: Manifest fetch failed (-1)</code> which is quite normal as per my findings in the internet) but the application cache works fine.</p> <p>In Weblogic server:</p> <p>I tried to run the same code in Weblogic server, in online mode, the files are cached as expected. But in the offline mode, for the first time the page is loaded, it works fine, but when I see the console the status of the application cache goes to OBSOLETE mode and so if I do a refresh of the page again, it throws me a 404 error. Also, I'm not getting the <code>"Application Cache Error event: Manifest fetch failed (-1)"</code> which I get when I try to run the code in tomcat server. Please let me know what's that I'm doing wrong. Below are the files:</p> <p>index.html</p> <pre><code>&lt;html manifest="demo.appcache"&gt; &lt;head&gt; &lt;link rel="stylesheet" href="style.css" type="text/css" /&gt; &lt;script type="text/javascript" src="script.js" &gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Basic example of page using Application Cache&lt;/h1&gt; &lt;p&gt;Disconnect from the internet and try to reload this page. It should load without requiring you to connect to the internet.&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>manifest file (demo.appcache)</p> <pre><code>CACHE MANIFEST CACHE: style.css script.js index.html demo.appcache NETWORK: * </code></pre> <p>style.css</p> <pre><code>body{ background-color: #333; } h1{ color: #c94054; } p{ color: #fff; } </code></pre> <p>script.js</p> <pre><code>if (!window.applicationCache){ alert('It seems that Application Cache is not supported in this browser. Please use a browser which supports it.'); } </code></pre> <p>web.xml </p> <pre><code>&lt;mime-mapping&gt; &lt;extension&gt;appcache&lt;/extension&gt; &lt;mime-type&gt;text/cache-manifest&lt;/mime-type&gt; &lt;/mime-mapping&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload