WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
61452
document.documentElement.cloneNode(true) causes resources to be downloaded again
https://bugs.webkit.org/show_bug.cgi?id=61452
Summary
document.documentElement.cloneNode(true) causes resources to be downloaded again
gildas
Reported
2011-05-25 11:30:32 PDT
Here are the steps to reproduce the problem : 1. Install Wireshark :
http://www.wireshark.org/download.html
2. Open
http://sergeydolya.livejournal.com/189087.html#cutid1
into a new tab 3. Start a capture with Wireshark and apply this filter: http.request && http.request.method == "GET" && http.request.uri contains "web.jpg" 4. Type in URL input: javascript:alert(document.documentElement.cloneNode(true)); void 42; What is the expected result? The browser shouldn't send again HTTP requests to get images content. What happens instead? Wireshark shows that images are downloaded again. This issue is also reproducible with Chrome. With Firefox 4 and IE9, there are no extra requests.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-05-25 23:40:40 PDT
These images are served with "Cache-Control:max-age=0, no-cache, no-store" header field, so obviously they can't be cached. Cloning an existing element can probably use the same image resource indeed - no need to request it from the network layer.
malch
Comment 2
2011-09-26 08:49:09 PDT
I have recently encountered this bug and offer a few additional observations: 1. There is no need to install a packet sniffer to observe the problem. One can view the unnecessary network activity from the Network Panel of the Chrome Developer Tools frame, for example. Or monitor the access log on the server hosting the image of course. 2. Although the problem seems to generally arise on images with no-cache, it can also be seen with regular static images that are 404 Not Found. 3. In my case, cloneNode() was being called from 500ms timer. Thus the level of unnecessary HTTP requests being generated was quite significant and multiple users caused a serious load problem for the server hosting the image.
Alexey Proskuryakov
Comment 3
2023-11-13 16:44:52 PST
***
Bug 264657
has been marked as a duplicate of this bug. ***
Radar WebKit Bug Importer
Comment 4
2024-01-22 18:46:16 PST
<
rdar://problem/121406746
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug