I have several instances of the same file included in a web page. Each instance generates different content depending on a variable passed in. However, since it is the same file, WebKit's web inspector shows the same file name repeatedly in the resource list. I cannot tell which is which until I view each one.
Since I am sending the header "Content-Disposition: inline; filename=foo", which is different for each of these instances, it would be desirable if the filename provided in the header could be used in the resource list so that the list makes more apparent which file is which.
Example posted at: http://www.sirensclef.com/safari_resources/
This is interesting! We might be able to show the content disposition then the real file name in parenthesis. Or visa-versa.
That's a good idea. Thinking about this further, if I don't send a content-disposition filename in the header, it would at least be useful to show the whole request URI, because the query string would help identify which instance is which.
While this may not be the most useful feature for many people, those who are doing what I'm doing in that example, or in the more common case of using PHP to construct images on the fly, I feel it would certainly be useful. Thanks for considering.
It seems that the test case for this broke at some point, fixed.
Three years later, this still seems useful to implement, and would probably be a simple addition. Is there any interest in taking it on? My note about showing the query string seems reasonably addressed now, but the original content-disposition filename request still stands.
It is not easy to parse Content-Disposition, because there are multiple ways to encode a non-ASCII file name. But something nearly equivalent is exposed as suggestedFileName on ResourceResponse.
I can't believe this hasn't been fixed yet.
Advanced servers store files in databases and the download URL does not match the file name. Content-Disposition is the way to transmit that file name. Honestly, these days users download lots of data from CGIs. These data should be saved with a proper name as specified by the server.
This even works in curl. (And Chrome and Firefox.)
Can someone please address this?