A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Static: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
m (→‎My Solution: some more...)
("changed my mind")
 
Line 1: Line 1:
This page is about a tag called '''static''' or '''locked''' that marks a portion of the page as not to be refreshed when refreshing or navigating to another page on the site.


== Use Case Description ==
Often some parts of the page on a site do not change in content, size and position on a given page or pages on a site. These parts shouldn't be redrawn when refreshing or navigating to a different page with the same elements. These elements are usually navigation bars, logos and legal disclamers on the bottom.
=== Current Limitations ===
There is no such tag at current, and though pics are stored in the browser cache, they are re-rendered every time the page or a similar one loads.
=== Current Usage and Workarounds ===
Frames work around this problem, but they are not widely used, and have problems which make them unpopular
=== Benefits ===
Browsing through a list of search results would become faster, also browsing through sites with many graphical elements
=== Requests for this Feature ===
== Proposed Solutions ==
=== My Solution ===
The solution would be to introduce <static> and </static> tags that would include the attributes static_url for the site and a static_id for the class of documents. For example <static static_url=whatwg.org static_id=001> ''insert code for the navigation bar'' </static static_id=001>
Then the browser would know on the next page that url and id are identical and just redraw the part of the screen corresponding to the code inside <static></static>. Through the id, a site can also adopt different static elements like navigation bars for different sections of the site. An alternative to the number would be a keyword like static_id="navbar1"
==== Processing Model ====
The browser would need a bitmap cache for the <static> parts of the current website, or possibly the ''n'' last visited websites together with their positions on the page. Also a timeframe should be set when to reload the static parts, either in the tag via a static_expires=x number of days property or via a fixed timespan, or from session to session (that would lessen the benefits considerably). Misuse should be difficult, since the website has to be one currently displayed. It doesn't work on pages on servers with different top domains, but that would be a case occurring seldomly.
==== Limitations ====
It doesn't work on pages of organizations with different top domains e.g. wikipedia.org vs. wikibooks.org etc., but that would be a case occurring not too often.
==== Implementation ====
Implementation on the browser seems straight forward, since redrawing parts of the screen is easy. It wouldn't work with sites that do not specify exact sizes or positions (or positioning elements that determine the position in an unamiguous way like a table with a width percentage) for elements.
==== Adoption ====
Faster rendering. A site with lots of graphics (NYT) would (re)load nearly as fast as a site with text only. Certainly ads and picture content would still have to reload, so not every page would reload faster.

Latest revision as of 13:40, 11 February 2007