- Source on github for jquery version: http://github.com/drogus/jquery-upload-progress
- Source on github for prototype version: http://github.com/drogus/prototype-upload-progress
- jQuery demo: http://drogomir.com/files/blog/jquery-upload-progress/example
- Prototype demo: http://drogomir.com/files/blog/prototype-upload-progress/example
- Installing apache upload progress
Recently I’ve wrote about apache upload progress module. I work mainly on linux and I haven’t check my scripts on safari. It was working even on IE, what possibly could be harder to obtain? ;-) Some people reported that demo is not working on safari and Michele resolved the problem (thanks Michele :).
Solved! The only thing to do was to open WinXP on VirtualBox and check it on Safari 3. Michele’s solution worked well, but to make it work there must be html page with given structure and javascript. I like “one file” easy to use scripts without any issues with static files :) So what? Create an iframe dynamically, load scripts dynamically, one file, the only thing that user will have to set is path to scripts.
With Safari? No, not really. I’ve wrote it in a few minuttes and checked in firefox. It worked, great, now safari. Nope….
Although Safari have great CSS support, it is really terrible with Javascript. WYSIWYG, javascript history, ajax issues, now the upload progress and iframes. In edge case libraries I often see hacks for IE and safari mainly.
Luckily Apple released Windows version of safari and I can check my scripts and pages on safari. Good… developer tools don’t work, though… I had to do some alert-like IE style debugging ;-) After many hours of trying new more and more insane ways to create iframe and load scripts into it, code with document.write() worked!
Check the commit on github. Lines 18-22 especially. And 28-line issue with safari not waiting to load previous script.
It’s really sad that after working on firefox with firebug or opera with developer tools I have to fight with Safari which is supposed to be modern browser. I know that on Mac developing scripts for safari is easier, thanks to working debug tools, but hey! I work on Linux. Why do I have to run Safari on Wine or VirtualBox, lacking debug tools? It’s a pain. I feel like I’m working on explorer…
I will add prototype version and possibly some usage page shortly (for know look at the demo code).

CLR said
Sep 11, 2008 @ 05:04 PM
I ran into the following which is apparently either a Safari or jQuery bug: when using Digest authentication on Apache, Safari doesn’t handle the ajax request properly. I am running Safari through WINE, so I don’t have access to the developer tools, but it appears it never hits the ‘success’ callback, which implies that it is dropping at least one of the key request headers; however, I tried this even with authentication turned off on the /progress url [verified by closing the browser, hitting the progress url with a fake X-Progress-ID, etc.], and it still doesn’t work in Safari.
FireFox works on the same setup, regardless of whether the /progress url requires valid-users.
Peter said
Oct 16, 2008 @ 04:14 AM
Yea, I can’t have it working with Safari using latest prototype and nginx module. It works fine in Firefox. Any idea where to look into? Thanks, Peter.
RSS feed for comments on this post
Leave a Comment