How to get app cache manifest to work on Safari 7.0.3?
Asked Answered
D

1

6

I am already hooked for two days now and it's driving me crazy. Hopefully someone can shine some light on this matter.

I am running: Mavericks (MAC), Safari Versie 7.0.3 (9537.75.14)

My index.php looks like:

<!DOCTYPE HTML>
<html manifest="manifest.php">
<head>
    <title></title>

    <meta charset="UTF-8" /> 
    <link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
    <p>The time is <time><?php echo time(); ?></time></p>
</body>
</html>

My style.css looks like:

html, body
{
    margin      : 0;
    padding     : 0;
    font-size   : 100%;
    font-family : "Helvetica Neue", Helvetica, Verdana, Arial, sans-serif;
}

p
{
    text-align : center;
}

p time
{
    color : red;
}

And my manifest.php looks like:

<?php header('Content- Type: text/cache-manifest'); ?>
CACHE MANIFEST
CACHE:
style.css

If I track the time output, it shows that it works, since the time doesn't get updated unless the manifest changes. I load the URL in Chrome and it works, I load the URL on Mobile Safari and it works! I load the URL in Safari on Mavericks and something wacky happens.

The time doesn't get updated as expected. When I look in the console, I see it has a program cache. All seems fine, however, when I disconnect from the internet en reload the page. It does reload the page without giving an error that I am offline, however any external file like the CSS is not loaded and gives the following error including the manifest itself:

Failed to load resource: The network connection is offline.

Again, Chrome and Mobile Safari work correctly with the same URL. I can't see what I am missing.

Disesteem answered 7/4, 2014 at 12:49 Comment(2)
I am also interested in this. Experiencing the same problem with safari 7.0.3. Appcache is mostly ignored...Ernestineernesto
same here, would be great to have some infos about it. works perfectly on chrome.Clinker
T
0

Try changing the manifest file extension to .appcache:

<html manifest="manifest.appcache">
Transistor answered 27/8, 2014 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.