Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8074747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:45:26+00:00 2026-06-05T14:45:26+00:00

Coldfusion has a system created client variable called lastvisit. Is there a way to

  • 0

Coldfusion has a system created client variable called lastvisit.

Is there a way to get the value of that variable during the request that it is actually set (i.e. client.thisvisit)?

The idea would be that I can store the “ThisVisit” timestamp in session and then compare it to lastvisit when the next request is made. This would tell me if another request was made in the session.

The purpose is that we have a page that we use an ajax record lock on which refreshes the lock every minute. After sixty minutes the ajax lock code will automatically log the user out of the website (due to inactivity). The issue arises where the user is executing tasks in other windows/tabs (indication of activity).

Sense all requests update LastVisit, I would like to have the ajax lock code save the save a “thisvisit” value so that the next time it runs it can compare it to the LastVisit client variable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:45:29+00:00Added an answer on June 5, 2026 at 2:45 pm

    A couple requirements:

    • Set up to use a DB rather than registry for your client vars (trust
      me).
    • Client vars have to have “global variables” enabled
    • Your cfapplication or application.cfc has to have client management enabled.

    If you have those three things you can select a query like the following:

    <cfquery name="getLvisit" datasource="myClientVarsDB">
        SELECT lvist 
        FROM   cglobal
        WHERE  cfid = 
            <cfqueryparam type="CF_SQL_CHAR" value="#urltoken#"/>
    </cfquery>
    

    urltoken might be wrong… it may need the jsessionID or CFID but my memory tells me cftoken. I’d have to hunt down a site using Client DBs to give you a definitive answer.

    So that would give you the current value of the lvisit variable. you would store this in the session and then compare it against the value from the table on subsequent queries before you overwrite it again (if that makes sense).

    Note – this value is updated on each request – so your query get’s the current value (before it has been updated). I previously thought this it was updated first but according to Tom it’s actually updated last.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Coldfusion CfChart Bar Graph, that has X-Axis = Questions, and Y-Axis
I'm working on a site that still has a lot of scripts in ColdFusion.
I am working on a performance critical system that has a lot of logging.
I have a IIS/ColdFusion question. I am working with a client, who has both
I am using ColdFusion 8.0.1 I am working on an existing application that has
We've been failing our PCI scans because ColdFusion has predictable CFIDs. The exact FAIL
This has been one of the biggest obstacles in teaching new people ColdFusion. When
There has always been a confusion with preg_match in php. I have a string
I am using ColdFusion 9.1.0. I am working on part of a site that
I am using BlazeDS java client to get info from this page . This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.