views:

287

answers:

2

I have noticed that my AS2 swf that I load into an AS3 swf with SWFBridge sometimes doesnt load. I have usually loaded the page several times and it works fine then sometimes it does not load. When I quit Safari and restart it it will work again. I havent noticed this happening on a Windows PC but only on Macbook OSX in both Safari and Mozilla.

I havent done any real debugging yet but has anyone got any leads?

thanks

A: 

This is a long shot, but I'm wondering if your server is compressing the SWF files and they're being corrupted at some point, or improperly decompressed on the Mac? If you can, make sure nothing is being gzipped, either by the server or by whatever you're using to publish the SWF files.

I've seen a similar issue where compressed files served by Apache won't render client-side... perhaps because Apache refuses to send a Content-Length header for compressed data. I think Apache's issue is that it doesn't know whether the Content-Length should reflect the length of the data stream or the uncompressed data, and assumes that the client might make a different assumption. OS X might be depending on this header.

Dolph
Would this result in it sometimes loading ok and sometimes not loading? Most of the time things do work ok but occasionally it doesn't load. Many thanks for the suggestion I'll check what is being gzipped.
undefined
If something is causing the transfer to be unreliable, sure. Love your username, btw.
Dolph
thanks :) I thought itd be a good username! im actually serving the swfs from windows iis 6 server not apache, could this still be the cause?
undefined
I would guess not. The issue I'm familiar with was very Apache-specific. It could still be a corrupted transfer, but it's likely caused by something different. It's most likely an issue isolated within the flash player / browser, especially since the "outer" SWF loads consistently. I would look for patches first, or perhaps known issues, with the involved client-side products. Hopefully someone else here has seen this specific issue though.
Dolph
A: 

If I'm misreading your explanation and sometimes it doesn't work the first time you load it into the browser than you can probably rule this out.

First check if it is being cached on the browser and what the cache settings on the problem browser are. Try changing those settings to see if it makes a difference if you see there is caching. If you see that it is somehow related to caching issues with those browsers you can take steps to prevent the swf from being cached. There are several ways you could do that.

The reason I suspect the browser cache is the problem is because you said that it works when you restart the browser as opposed to it works when you restart the server. If it wasn't being cached it would probably tend to not work once and then work the next time without the browser restart. Its entirely possible you have some other problem though.

jarrett
thanks, I've tried clearing the browser cache but that didn't help. I think it must be something to do with the connection name that swfbridge uses, maybe if I try cachebusting this variable name I would create a new connection each time.
undefined
Maybe you can just append a meaningless id in a querystring for each request so the address will be different enough to cause that. Good luck.
jarrett