问题描述
我有一位正在使用最新版本的OSX和Safari的用户。当他试图通过表单上传一个文件时,它会挂起(微调旋转),但什么也没有发生。我做了一些研究,发现这一点:
http://blog.sina.com.cn/u/blogspot - 基于4个网页b 这个修正了以前版本Safari的问题,但显然不是Safari 5. 我想知道是否有人有任何想法如何解决这个问题?有人提到它与持久的http连接(因此上面的修复)有关,我使用PHP(但我不认为这很重要)。 添加 添加到处理文件上传的代码中。它似乎并没有解决100%的问题,但它肯定会改善它。请注意,它是区分大小写的:连接:关闭将无法正常工作。 I have a user who is using the latest version of OSX and Safari. When he tries to upload a file through a form, it hangs (spinner spinning) but nothing happened. I did some reasearch and found this: http://airbladesoftware.com/notes/note-to-self-prevent-uploads-hanging-in-safari This fixed problems in previous versions of Safari, but obviously not Safari 5. I was wondering if anyone else has any ideas how to resolve this? There was some mentioned of it being related to persistent http connections (thus the fix above) and I am using PHP (but I don't think that matters). I've had some success sending the connection: close header to solve this issue. Add to the code that handles the file upload. It doesn't seem to solve the issue 100% but it certainly improves it. note that it's case sensitive: "Connection: close" won't work. 这篇关于Mac上的Safari 5挂起上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
header(connection:close);
header("connection: close");