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
- Archiving program
The location of the source code to archive web page is "/admin/archiver/api/".
The "webarchive.alns" is the source code including archiving apis.
The archiving program is called from the logger.
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.
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.
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.
After convert the Html, it fetches and store the items at the "for loop" handling the "@res.replaced" variable.
If the item is css, it converts the url used in the css and store it.