There's an idea floating around of introducing a zip URL for resources. The general structure would be:
zip:{URL-to-zip}!{relative-URL-inside-zip}
Lack of ! is a parsing failure.
The zip URL works by (URL) parsing everything between zip: and ! against a base URL (if any).
zip:/e.zip!e.html
zip:http://example.org/e.zip!e.html
Where I run into problems is identifying the URL of the resource. Say you have the following on http://example.org/
:
<iframe src=zip:/e.zip!e.html>
What will <iframe>.contentWindow.location
return? If e.html
contains a relative URL, where should that resolve to? What if it's a path-absolute URL?
Even for simple cases such as <img src=zip:/i!pony.gif>
we'd need to define the origin in a special cased manner.
The way URLs are supported today zip URLs would end up like a data URL and not have useful properties in the URL API.
We could offer generalized support for URL schemes that support other URLs inside of them. E.g. view-source seems to also require this. However that would be an even more fundamental change to the overall URL landscape.