You can knock this out fairly simply by using the Ajax Toolkit within your visualforce page, which is capable of creating and updating visualforce via create
and update
calls. Here is an example of a page that updates itself, recoding the name of whomever visits it:
<apex:page showHeader="true" sidebar="true" title="???">
<apex:includeScript value="/soap/ajax/25.0/connection.js"/>
<apex:includeScript value="/soap/ajax/25.0/apex.js"/>
<div>
Who has visited this page so far:<br /><br />
WHOSE NEXT?
</div>
<script>
sforce.connection.sessionId = '{!$Api.Session_ID}';
function printUsername(result) {
result = result.getArray('records');
var next = 'WHOSE NEXT?';
var newName = '{!$User.FirstName & " " & $User.LastName} <br/>' + next;
result[0].Markup = result[0].Markup.replace(next, newName);
sforce.connection.update(result);
}
sforce.connection.query(
"SELECT Id, Markup FROM ApexPage WHERE Name = 'Mystery'",
{ onSuccess : printUsername });
</script>
</apex:page>