This topic has not yet been rated - Rate this topic

expires Property

Sets or retrieves the expiration date of data persisted with the userData behavior.

Syntax

XML N/A
Scripting [ sUTCString = ] userData.expires

Possible Values

sUTCString String that specifies or receives the expiration date in Coordinated Universal Time (UTC) format.

The property is read/write. The property has no default value.

Remarks

The expires property designates the amount of time that persisted information is available. Windows Internet Explorer removes the persisted information when the browser checks the date, and the designated time has expired.

Example

This example uses the expires property to set the expiration date of persisted data to one minute after the information is persisted.


<STYLE>
.userData { behavior: url(#default#userdata)}
</STYLE>

<SCRIPT>
function fnSave(){
   var oTimeNow = new Date(); // Start Time
   oTimeNow.setMinutes(oTimeNow.getMinutes() + 1);
   var sExpirationDate = oTimeNow.toUTCString();

   oPersistDiv.expires = sExpirationDate;
   oPersistDiv.setAttribute("sData",oPersistText.value);
   // Save the persistence data as "sTimeout".
   oPersistDiv.save("sTimeout");
}
</SCRIPT>

:

<DIV CLASS = "userData" ID=oPersistDiv onsave = "fnSave()" >
<INPUT TYPE=text ID=oPersistText>

Standards Information

There is no public standard that applies to this property.

Applies To

userData

See Also

Introduction to Persistence
Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.