The document object has several properties that can provide you with information about a webpage's file. The document object's fileCreatedDate, fileModifiedDate, and fileSize properties can be used to determine the date a webpage was created, the date it was last modified, and the size of the webpage file. This example shows how to display these properties.
Welcome to Bucaro TecHelp!

Welcome to Bucaro TecHelp!
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

[About BTH]  [User Agreement]  [Privacy Policy]  [Site Map]  [Contact Form]  [Advertise on BTH]  [News Feed]

Google
Web
This Site

Get Webpage File Date and File Size

The document object has several properties that can provide you with information about a webpage's file. The document object's fileCreatedDate, fileModifiedDate, and fileSize properties can be used to determine the date a webpage was created, the date it was last modified, and the size of the webpage file. The example below shows how you could display these properties.

<html>
<head>
<script language="JavaScript">

function getSizeDates()
{
document.writeln("Created: " + document.fileCreatedDate);
document.writeln("Modified: " + document.fileModifiedDate);
document.writeln("Size: " + document.fileSize + " bytes");
}

</script>

</head>
<body onload="getSizeDates()">
</body>
</html>

-  These methods receive their information from the operating system file manager, so you must understand how the operating system deals with files to understand the information provided by these methods. For example, if you move a file, it keeps the same fileCreatedDate. If you make a copy of the file, the fileCreatedDate of the copy will be the date you created the copy. Renaming a file does not change the fileCreatedDate, but the fileModifiedDate will be the date that you renamed the file.

Web Design Sections
Java Script Quick Reference
Java Script Data Types
Java Script Reserved Words
Java Script Arithmetic Operators
Comparison Operators
Java Script Arrays
Java Script Character Encoding and Decoding
The if/else Structure
The switch/case Structure
The for Loop
The while Loop
The break Statement
The continue Statement
JavaScript Math Object
Round a Number
Determine Absolute Value
Determine Minimum and Maximum
Generating Random Numbers
Java Script Trigonometric Methods
Java Script Number Object
Format a Number as Currency
Java Script Strings
Compare Two Strings
Find a Character or a Substring Within a String
Include a Quote Character in a String
Include a Backslash Character in a String
Define Lines in a String
Use Escape to Replace Dangerous Characters
Convert a Number to a String
Convert a String to a Number
The Document Object Model (DOM)
Accessing Web Page Elements
Interactively Set Webpage Colors
Get Webpage File Date and File Size
Dueling Windows
Cookie Power Made Easy

[Site User Agreement]  [Advertise on This site]  [Search This Site]  [Contact Form]
Copyright©2001-2007 Bucaro TecHelp P.O.Box 18952 Fountain Hills, AZ 85269