tags:

views:

38

answers:

2

Is there a web site that can verify your web pages. Specifically, let's say you created a web page on Monday and you want your users to be assured that when they view the same page on Tuesday, that it's the same page that was posted on Mondya (without any modifications).

Thank you.

+1  A: 

To get the last modified data of a webpage, you can use the document.lastModified property with javascript.

In order to ensure your users, see:

Sarfraz
I'm looking for a third party to "vouch" on my behalf that the webpage was not modified.
Joe
The "third party" is your HTTP server. :-)
Gilbert Le Blanc
@Joe: how about google webmaster tools? http://www.google.com/webmasters/
Sarfraz
@Gilbert, if I have access the my HTTP server, I can modify it whenever I want. I'm looking for a service that will look at my page and vouch that I didn't modify the page.
Joe
A: 

You can verify your own web pages with a little bit of javascript

<script type="text/javascript" language="JavaScript" src="lastupdated.js"></script>
<script type="text/javascript" language="JavaScript">
<!-- Write last modified date at the bottom of the page
var dateObj = new Date(document.lastModified)
var dateString = lastUpdated(dateObj)
document.write(dateString)
// -->
</script>

And this is the lastupdated JavaScript

function lastUpdated(dateObj)
{
var dayNames = new Array(8);
dayNames[1] = "Sunday";
dayNames[2] = "Monday";
dayNames[3] = "Tuesday";
dayNames[4] = "Wednesday";
dayNames[5] = "Thursday";
dayNames[6] = "Friday";
dayNames[7] = "Saturday";

var monthNames = new Array(13);
monthNames[1] = "January";
monthNames[2] = "February";
monthNames[3] = "March";
monthNames[4] = "April";
monthNames[5] = "May";
monthNames[6] = "June";
monthNames[7] = "July";  
monthNames[8] = "August";
monthNames[9] = "September";
monthNames[10] = "October";
monthNames[11] = "November";
monthNames[12] = "December";

var theDay = dayNames[dateObj.getDay() + 1];
var theMonth = monthNames[dateObj.getMonth() + 1];
var dayNumber = dateObj.getDate();
var fullYear = dateObj.getYear();
if (fullYear < 1900) { fullYear = fullYear + 1900 };
var dateString = '<center><font face="arial, helvetica" size="-3">' + "Last modified on " + theDay + ", " + theMonth + " " +         dayNumber + ", " + fullYear + " </font></center>";
return dateString;
} 
Gilbert Le Blanc
I'm looking for a third party to "vouch" on my behalf that the webpage was not modified
Joe
@Joe The third party is your HTTP server. That's how anyone else would determine the last modified date.
Gilbert Le Blanc
@Gilbert, if I have access the my HTTP server, I can modify it whenever I want. I'm looking for a service that will look at my page and vouch that I didn't modify the page.
Joe
@Joe Yes, you can modify your pages on your HTTP server. However, the document.lastModified value for each page also changes to correspond to your page change.
Gilbert Le Blanc