dongxian1921 2014-10-01 00:26
浏览 29

如何检测网页是否与php,javascript或jquery一起使用

I'm trying to figure out how one would detect whether a web-page is in use. I am building a kind of web-appliance which has an HTML5 RDP client type thing. I need to detect whether the page is currently in use, if possible a specific url including a GET variable. I have searched every variation that I can think of for doing this and have come up with the following, but none seem to work for me.

Pretty much my goal is to make a change in a mysql DB whenever a the page is active, then change it back when it's not.

  1. PHP sessions. This won't work for me because the session may still exist even if the user has left the specific page (I believe).
  2. Javascript window.onbeforeunload, however I see that this is pretty unreliable. Particularly if a user has security features enabled.
  3. I found some obscure referance to using php enviromental variables, but I wasn't sure how that would work, since it still wouldn't revert the variable or dismiss it when the page was closed.

Any suggestions are greatly appriciated!!!!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
    • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
    • ¥15 onvif+openssl,vs2022编译openssl64