Chris Pollett > Students >
Periyapatna

    ( Print View )

    [Bio]

    [Project Blog]

    [CS297 Proposal]

    [Deliverable 1 - Hello World Extension]

    [Presentation on XUL-PPT]

    [Deliverable2 - Capture Events]

    [Deliverable3 - Preferences]

    [Deliverable4 - Caching]

    [CS297 Report - PDF]

    [CS298 Proposal]

    [CS298 Report - PDF]

    [CS298 Presentation- PPT]

    [Download Project-ZIP]

    [Installation Guide]

                          

























Deliverable 4 -Caching

Caching Pages

Description: The fourth deliverable was about caching pages according to the user selected preference. Following figure shows two new icons in the toolbar that serves as back and forward buttons to view the cached pages. Caching Begins

The page DOM tree is captured using the body.innerHTML property, which is then written to the disk. The URL of the page is used as a key for writing to and reading from the cache. The URL is appended with the timestamp at which the page is cached,before writing to the cache. Resource Description Framework Resource Description Framework (RDF) is a simple, cross-platform database for small data stores. Bookmarks, global history in mozilla use RDF. Before writing to cache the content, URL and title are stored as literals in RDF resources. Before writing any content to the cache the content is compared with all the previously written content to check if the content is equal. This is done with the help of RDF. When the content is cached a new menu item is added to the cacheBackButton. When the cacheForwardButton is clicked the top most menu item gets appended to the cacheForwardButton menu while it gets deleted from the cacheBackButton menu. When the cacheBackButton is clicked the document content is loaded from the cache. Following figure shows the button clicked and the page that was cached few seconds back gets displayed. Also the URL in the address bar shows the URL appended with the time stamp, the time at which the page was cached. Back Button

When the cacheForwardButton is clicked the document content is loaded from the cache. Following figure shows the forward button clicked and the page that was cached few seconds back gets displayed. Also the URL in the address bar shows the URL appended with the time stamp, the time at which the page was cached.Forward Button