Source code of Archive web page

 The Web Access Recorder has page archiver to store the contents at the time. The Archiving request is done automatically by the action logger. Please take a look at Log visitor's action about the detail timing of requesting archive

Archiver's Source code location

 The location of the source code to archive web page is "/admin/archiver/api/".

Source folder of the archiver

The "webarchive.alns" is the source code including archiving apis.

Archiving program

The archiving program is called from the logger.

Calling archiving api

 The caller of the archiving api is at the logger.

 This program archives if the archived data expires a day. You can customize the expiration by changing here.

Archiving program

 The main program of archiving is the "WebArchive.archivePage()" function in the "webarchive.alns".

This program get the html to archive by using "Http.access()". After that, convert the html into archiving style.

Convert and fetch items in the html

 The "AlinousArchiver.convertHtml()" function converts and detect the items in the html. This program is implemented in Java language. About the location of the source code, please take a look at Parse HTML ans CSS.

 This function returns dom variable "$res", and the structure is below.

 view returned result by debugger

 You can watch the result of this function by using debugger of the Alinous-IDE works on the Eclipse Platform.

Handle items in the original Html

 After convert the Html, it fetches and store the items at the "for loop" handling the "@res.replaced" variable.

If the item is image, it encodes the image in the Base64 fromat, and store it into the database. If the Item is Javascript, it stores directly.

If the item is css, it converts the url used in the css and store it.


Go to Top