[Slightly edited from http://www.realworldtech.com/forums/ind ... 7&roomid=2 --which received no response]
Three Web optimization ideas came to mind:
Sprited PNG:
By extending PNG with a new chunk type it seems it would be possible to use a fragment identifier (using '#') in a url to specify a sub-image within a PNG file without using CSS. This would have at least two advantages over CSS sprites. It would unify the sprite management to a single file, reducing the potential for inconsistencies; and it would allow meaningful names to be used in the url (e.g., "site-sprites.png#home_link"), incidentally avoiding the need for a dummy file url in the img/object tag (very minimal benefit).
This would obviously require adding support in browsers and might bloat the PNG file more than it would shrink the CSS, but the development advantages might be worth the bother
and cost.
Conditional-on-caching http push:
When a get request is made, the client could include a header indicating the cached content (including timestamp or version) for the site and/or subsection of the site. The server would have to indicate with each resource sent its caching nature (i.e., which collection it belongs to), and the caching client would have to manage items in a collection as a unit (or use a fallback method of individually requesting items).
The domain name could be used for site-wide resource collections and perhaps the file system directory structure might be used to indicate subsections (beyond subdomain divisions).
This feature would allow content to be provided as rapidly as if it was included for the uncached case (removing the justification of most included scripts and CSS) and in the cached case not only could bandwidth use and network latency be avoided, but the cached content might be cached in a pre-processed format, allowing it to be applied more quickly. The uncached case might also make more effective use of potential bandwidth by having a single large-window stream.
Support for signed rather than encrypted content:
One of the issues with https is the lack of distinction between private content (e.g., bank account information) and authenticated content (e.g., style sheets). Authenticated content can be the same for many people and so could take advantage of content distributors and proxy caches, but such content needs to be verified to assure that it is the correct content. It seems that it would be possible to include a digital signature with the url, so the client could be assured that the content was correct.
This would allow the client software to allow non-encrypted content to be considered 'secure', not requiring a warning.
(Unfortunately, this does not seem to mesh well with the above conditional push; a proxy cache would not be able to read the get request to service any possible cached content. This might be worked around by sending a non-encrypted http request which the server transforms to an https request, but that might add far too much complexity. There is also some danger that the content provider might not view some items as private [and send them as unencrypted but signed inclusions to save a little money] which the user does view as private but cannot easily see as being unencrypted. A worse danger would be a system that accidentally sends sensitive data unencrypted.)
Any comments?
Three Web optimization ideas came to mind:
Sprited PNG:
By extending PNG with a new chunk type it seems it would be possible to use a fragment identifier (using '#') in a url to specify a sub-image within a PNG file without using CSS. This would have at least two advantages over CSS sprites. It would unify the sprite management to a single file, reducing the potential for inconsistencies; and it would allow meaningful names to be used in the url (e.g., "site-sprites.png#home_link"), incidentally avoiding the need for a dummy file url in the img/object tag (very minimal benefit).
This would obviously require adding support in browsers and might bloat the PNG file more than it would shrink the CSS, but the development advantages might be worth the bother
and cost.
Conditional-on-caching http push:
When a get request is made, the client could include a header indicating the cached content (including timestamp or version) for the site and/or subsection of the site. The server would have to indicate with each resource sent its caching nature (i.e., which collection it belongs to), and the caching client would have to manage items in a collection as a unit (or use a fallback method of individually requesting items).
The domain name could be used for site-wide resource collections and perhaps the file system directory structure might be used to indicate subsections (beyond subdomain divisions).
This feature would allow content to be provided as rapidly as if it was included for the uncached case (removing the justification of most included scripts and CSS) and in the cached case not only could bandwidth use and network latency be avoided, but the cached content might be cached in a pre-processed format, allowing it to be applied more quickly. The uncached case might also make more effective use of potential bandwidth by having a single large-window stream.
Support for signed rather than encrypted content:
One of the issues with https is the lack of distinction between private content (e.g., bank account information) and authenticated content (e.g., style sheets). Authenticated content can be the same for many people and so could take advantage of content distributors and proxy caches, but such content needs to be verified to assure that it is the correct content. It seems that it would be possible to include a digital signature with the url, so the client could be assured that the content was correct.
This would allow the client software to allow non-encrypted content to be considered 'secure', not requiring a warning.
(Unfortunately, this does not seem to mesh well with the above conditional push; a proxy cache would not be able to read the get request to service any possible cached content. This might be worked around by sending a non-encrypted http request which the server transforms to an https request, but that might add far too much complexity. There is also some danger that the content provider might not view some items as private [and send them as unencrypted but signed inclusions to save a little money] which the user does view as private but cannot easily see as being unencrypted. A worse danger would be a system that accidentally sends sensitive data unencrypted.)
Any comments?