Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/19/21 in all areas

  1. hello @Norm I made my own procedure for ended sessions: TUniServerModule.UniGUIServerModuleBeforeInit urlMessage := '<html>' + '<style>' + '.button {' + ' border: none;' + ' color: white;' + ' padding: 16px 32px;' + ' text-align: center;' + ' text-decoration: none;' + ' display: inline-block;' + ' font-size: 16px;' + ' margin: 4px 2px;' + ' transition-duration: 0.4s;' + ' cursor: pointer;' + ' border-radius: 12px;' + ' box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);' + ' margin: 0;' + ' position: absolute;' + ' top: 10%;' + ' left: 50%;' + ' -ms-transform: translate(-50%, -50%);' + ' transform: translate(-50%, -50%);' + '}' + '.button1 {' + ' background-color: white;' + ' color: black;' //+ ' border: 2px solid #4CAF50;' + '}' + '.button1:hover {' + ' background-color: #4CAF50;' + ' color: white;' + '}' + '</style>' //reload page + '<script>' + 'function redirect() {location.href = window.location.href;}' + '</script>' + '<body bgcolor="#dfe8f6">' + '<p style="text-align:center;color:#0000A0">[###message###]</p>' + '<button class="button button1" type="button" onclick=redirect()>Restart application</button>' + '</body>' + '</html> ; ServerMessages.ExceptionTemplate.Text := urlMessage; ServerMessages.InvalidSessionTemplate.Text := urlMessage; ServerMessages.TerminateTemplate.Text := urlMessage; here is result: So i make too: 1. Short sessions timeout - 30 minutes 2. uniTimer to check user activite and close session (Browser closed or no user activities) 3. I have no Timer on login form (session expired after 30 minutes), but after login: Timer is activated and this keep session alive forever. That make me to create: 3.1 every 15 min i ask from user to confirm if is there . Wait 15 second answer from user and close session if not answer. 3.2 Wait 30 minutes for user activities and close session if no activities. This is solution if user close browser, stop internet or is passive (no activities) All this is in file with user settings. Points 3.1 and 3.2 make the same (close session if no user activities), so one of them is enough. I allow with user settings to choose how the application works.
    1 point
  2. You type: http://localhost:8077/chart You get: You type: http://127.0.0.1:8077/fishfacts You get:
    1 point
×
×
  • Create New...