Closed
Bug 654241
Opened 15 years ago
Closed 10 years ago
Loading multiple instances of identical SWF file only pulls first instance from cache (if present)
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 446876
People
(Reporter: cormip, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
I am trying to load multiple instances of the same SWF on a page. Once the SWF is cached (previous or current visit), I want the 2nd, 3rd, 4th, etc instances to be pulled from the browser cache. However, only the 1st instance ever seems to pull from the cache.
This behavior is only seen in FireFox v3.6 & v4.0. I tested IE8, IE9 & Chrome, and all of those behave as you expect they would (if loaded at least once, all further calls pull from the cache).
I have a test page with the body as simple as this:
<object data="test.swf" id="myId1" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId2" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId3" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId4" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId5" width="300" height="120"><param name="movie" value="test.swf"></object>
Reproducible: Always
Steps to Reproduce:
Create a page that loads multiple instances of the same SWF file. For example:
<object data="test.swf" id="myId1" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId2" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId3" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId4" width="300" height="120"><param name="movie" value="test.swf"></object>
<object data="test.swf" id="myId5" width="300" height="120"><param name="movie" value="test.swf"></object>
Actual Results:
Only the first SWF is pulled from the cache (if present and NOT stale). Each of the subsequent instances all re-download copies of the SWF independently.
Expected Results:
1. If first load of page, first instance of SWF is downloaded from server, then subsequent instances of SWF are retrieved from local cache.
2. If page was already loaded (and SWF already in cache), then ALL instances checked for staleness and pulled from local cache (if still fresh).
Looking at FireBug, I can see that only the first request to the SWF has the following specific Request Headers:
If-Modified-Since: Thu, 28 Apr 2011 16:26:35 GMT
If-None-Match: "34a1b9ac15cc1:0"
Cache-Control: max-age=0
The 2nd through Nth requests do not have these headers?!? The full set of headers looks like this:
First SWF on Page
Request Headers
GET test.swf HTTP/1.1
Host: dev.xxxxxxxxxxx.com
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://dev.xxxxxxxxxxx.com/test.cfm
Cookie: JSESSIONID=84305edd230f682f47a34c235b2b253c3059
If-Modified-Since: Thu, 28 Apr 2011 16:26:35 GMT
If-None-Match: "34a1b9ac15cc1:0"
Cache-Control: max-age=0
Response Headers
HTTP/1.1 304 Not Modified
Last-Modified: Thu, 28 Apr 2011 16:26:35 GMT
Accept-Ranges: bytes
Etag: "34a1b9ac15cc1:0"
Server: Microsoft-IIS/7.0
Date: Thu, 28 Apr 2011 17:38:58 GMT
2nd, 3rd, 4th, Nth SWF on Page
Request Headers
GET test.swf HTTP/1.1
Host: dev.xxxxxxxxxxx.com
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://dev.xxxxxxxxxxx.com/test.cfm
Cookie: JSESSIONID=84305edd230f682f47a34c235b2b253c3059
Response Headers
HTTP/1.1 200 OK
Content-Type: application/x-shockwave-flash
Last-Modified: Thu, 28 Apr 2011 16:26:35 GMT
Accept-Ranges: bytes
Etag: "34a1b9ac15cc1:0"
Server: Microsoft-IIS/7.0
Date: Thu, 28 Apr 2011 17:38:58 GMT
Content-Length: 31063
Comment 1•15 years ago
|
||
> The 2nd through Nth requests do not have these headers?!?
Because they can't get access to the cache entry (which is locked by the first request, which is still in progress), so don't know our cached ETag and Last-Modified time, so can't do a conditional request.
This looks like a duplicate of the bug about allowing multiple consumers to read the cache at once.
Updated•15 years ago
|
Whiteboard: DUPEME
Comment 2•15 years ago
|
||
Agreed - this is a dup
| Reporter | ||
Comment 3•15 years ago
|
||
As of Firefox release 7.0.1 this BUG continues to exist and cause problems for my users. This BUG does not exist in either Internet Explorer or Google Chrome. Does someone have an ID for the bug this is a duplicate of?
Comment 4•10 years ago
|
||
see comment 1 - can you figure out the dup and mark it? thanks!
Flags: needinfo?(michal.novotny)
Whiteboard: DUPEME → DUPEME[necko-backlog]
Comment 5•10 years ago
|
||
It's a dupe of 446876.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(michal.novotny)
Resolution: --- → DUPLICATE
Updated•10 years ago
|
Whiteboard: DUPEME[necko-backlog]
You need to log in
before you can comment on or make changes to this bug.
Description
•