Your question is a little vague but...
If you are using ASP you can use the Session_OnStart
event procedure imbedded in Global.asa. That event is
fired once when a new Session is started (not for every
page).
Otherwise you can use the HTML onload event to associate
a script for every time the page is displayed. This can
be disabled if the client disables active scripting
though.
Example:
<script language="VBScript"><!--
Sub Window_OnLoad()
' do something here
End Sub
-->