Ask a Question related to ASP, Design and Development.

  1. #1

    Default logging user visit




    I am building an ASP application, in this application, one of the
    functions is that I have to know exactly how long a user has used a
    certain page of the application. so I need a way to long the time a user
    enters a page and when he leaves again.

    the problem is when the user closes the browser, no time for leaving is
    recorded...

    Is there a way to run a web service that can read cookies of all the
    users and write them to a database? Or am I looking too far for the
    solution.

    I'd like a clean solution, not with popups, or opening other windows in
    order to run extra asp code..

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Francis Dhaenens Guest

  2. Similar Questions and Discussions

    1. Logging a user
      Hey all, Question - is there any way to "log" the people who have logged in to use a CF App? Here is my scenario - I am creating a CF app that...
    2. avoid logging same user again...
      the system consist of many wireless pocket pc connected to a portatil computer which has the access point and is the server which counts the data;...
    3. ASP.net app with Windows authentication challenging one user only on second visit
      Hi All, I have an intranet application that uses ASP.net Windows authentication. It has been working flawlessly for the past year. Recently,...
    4. New picture on each visit
      Hi everyone I have a picture at the top section of the main page and I would like it to be a different picture each time someone visits the site....
    5. Visit my website. Please
      Well.... Apart from not being: a bomber, real, old, or on topic for this ng, i reccomend 'the shepherd' by f forsyth iirc......!!
  3. #2

    Default Re: logging user visit

    You could trap this *sometimes* by writing some javascript in your
    pages, trapping the onBeforeUnload event and maybe posting something to
    your server then.

    But there are ways the user can get past this, e.g. physically bringing
    down the connection before they close the browser (disconnecting the
    phone line if its a dialup connection), or even (a bit extreme!) just
    switching the machine off at the wall without exiting anything.

    I'm fairly sure there is no 100% reliable way to achieve what you want.
    You can only really record when the user comes back to your site.

    HTH,
    Pete


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Pete Guest

  4. #3

    Default Re: logging user visit

    The most common approach I have come across is to track each time someone
    requests a page and record it in a db. Any entries less than 20 mins old
    (for default time-out settings) are considered 'live'. That is, if you can
    just accept that you are potentially 20 minutes out-of-date when you query
    the DB, life is a lot easier.

    As Pete has stated, there is currently no guarranteed way of tracking your
    users accurately.

    I'm not sure if this is helpful to you... Why are you trying to track the
    length of time they are on your site? Is it for billing for a provided
    service? Or just for your information?

    If it just informational, then my method may well be OK. If you need to be
    more accurate, I think you will be disappointed..

    hth

    Chris


    "Pete" <anonymous@devdex.com> wrote in message
    news:OwhxGcJnDHA.2500@TK2MSFTNGP10.phx.gbl...
    > You could trap this *sometimes* by writing some javascript in your
    > pages, trapping the onBeforeUnload event and maybe posting something to
    > your server then.
    >
    > But there are ways the user can get past this, e.g. physically bringing
    > down the connection before they close the browser (disconnecting the
    > phone line if its a dialup connection), or even (a bit extreme!) just
    > switching the machine off at the wall without exiting anything.
    >
    > I'm fairly sure there is no 100% reliable way to achieve what you want.
    > You can only really record when the user comes back to your site.
    >
    > HTH,
    > Pete
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    CJM Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139