0

I've set up a very simple html page at http://www.knuckledown.net that looks like this:

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
</head>
<body>
</body>
</html>

If I try to load this page in Safari (on iPhone or in Windows Safari desktop) the browser shows the loading spinner for 1 minute until it times out. But only every second time you load the page.

This doesn't happen in IE, Chrome or Firefox, and it doesn't matter what the name or content of the script is. It doesn't happen when I host the file on my local machine, only on my Heroku hosting. If it's relevant, it's being served by PlayFramework 1.2.4. I'm stumped - any ideas what could be happening here?

-- update --

heroku logs:

» 08:28:01.445 2013-05-29 22:28:01.378683+00:00 heroku router - - at=info method=GET path=/ host=www.knuckledown.net fwd="101.165.43.250" dyno=web.1 connect=13ms service=13ms status=200 bytes=115
» 08:28:01.868 2013-05-29 22:28:01.791882+00:00 heroku router - - at=info method=GET path=/js/jquery-1.7.2.min.js host=www.knuckledown.net fwd="101.165.43.250" dyno=web.1 connect=2ms service=45ms status=304 bytes=33732
Daniel Alexiuc
  • 13,078
  • 9
  • 58
  • 73

1 Answers1

1

I found out it is something to do with my response headers. I implemented my own static file gzip, minify and caching for Play Framework that I had forgotten about here: https://stackoverflow.com/a/10916904

I guess the caching headers I was using were acceptable to all browsers except for Safari.

It was based on the existing Play framework caching strategy, so I guess I'll disable the addEtag() method until I can figure out how to fix it.

Community
  • 1
  • 1
Daniel Alexiuc
  • 13,078
  • 9
  • 58
  • 73