ouyang789987 / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Strange issue: In IE, SWF isn't rendered after its in IE's cache #403

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using JQuery as well. On the page load event I use SWFObject to embed
the SWF (with wmode == transparent, allowScriptAccess == 'always' *and*
using bi-directional ExternalInterface).

What steps will reproduce the problem?
1. Load the page - SWF is rendered
2. Reload the page - SWF is gone.

What is the expected output? What do you see instead?
I expect to see the SWF.

What version of the product are you using? On what operating system?
2.2 on XP

Please provide any additional information below.
My CSS ought to cause the object tag to hasLayout. 

Strangely #1: once the page loads I can use jQuery to set *any* css rule
and the SWF is rendered (even a CSS rule which shouldn't effect rendering,
like $('#my_flash').css({fontSize:'12px'})

Strangely #2: I use swfobject for other SWFs in the site and they render
fine. The difference is ExternalInterface. I've done what I can to mitigate
the issue (delayed loading of flash until the page is loading, I use a
callback from flash to tell the page when it's ready, setTimeout in the SWF
until ExternalInterface.available, etc). It just really weirds me out that
everything works fine with an empty cache. 

You can test it by going to http://growshow.com/swfobjecttest and logging
in with these credentials:

Email: test@swfobject.com
Password: swfobject

Original issue reported on code.google.com by thereald...@gmail.com on 13 Nov 2009 at 6:54

GoogleCodeExporter commented 9 years ago
Oh, and click on "Edit Sequence" to get to the editor where the problem is

Original comment by thereald...@gmail.com on 13 Nov 2009 at 6:56

GoogleCodeExporter commented 9 years ago
OK, it seems that it's a combo of problems, including cache control headers. It 
seems
that if the cache-control header sets a long max-age (and there's no 
last-modified
nor etag headers) then the problem is present. Removing that behavior and 
relying on
etag headers seems to fix the issue. Very strange. Hopefully this will help 
someone else.

Original comment by thereald...@gmail.com on 13 Nov 2009 at 9:59

GoogleCodeExporter commented 9 years ago
Still - very strange that using jQuery to set *any* css - like font-size - would
bring it out from the cache and render the SWF...

Original comment by thereald...@gmail.com on 13 Nov 2009 at 10:02

GoogleCodeExporter commented 9 years ago
do you experience the same problems when embedding using the <object><embed> 
approach
in place of SWFObject, or is it only when you use SWFObject?

Original comment by platelu...@gmail.com on 15 Jan 2010 at 3:07

GoogleCodeExporter commented 9 years ago
Hello, I am having a problem. The first time the page loads, the flash shows, 
but when 
I navigate the flash disappears. Is it the same problem? what do I have to do?

Original comment by alejandr...@gmail.com on 24 Jan 2010 at 11:47

GoogleCodeExporter commented 9 years ago
I added this "<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">" in the 
header and
when you hit the reload button, the flash is gone.

Ideas?

Original comment by jtre...@gmail.com on 10 Feb 2010 at 2:53

GoogleCodeExporter commented 9 years ago
This does not appear to be a SWFObject bug. If you'd like to discuss the issue 
further, please post to the SWFObject Google Group.

Original comment by platelu...@gmail.com on 7 Nov 2010 at 8:46

GoogleCodeExporter commented 9 years ago
I had the same issue, after searching I found the way to prevent the swf 
caching with swfobject. You need to append a random number to the and of the 
player swf file, for example :
var timeStamp = "?t=" + new Date().getTime();
swfobject.embedSWF(player_path + timeStamp ...

Original comment by zenmas...@ifzenelse.net on 14 Apr 2012 at 10:05