是否有最佳实践来检测应用程序的首次运行? [英] Is there any best practice how to detect a first run of the app?

查看:74
本文介绍了是否有最佳实践来检测应用程序的首次运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简便方法来检测应用程序是否首次运行? 我知道,可以设置一个cookie并检查它是否存在,但是还有另一种-甚至更好的方法吗?

Is there an easy and smooth way how to detect if an app is run the first time? I know, it would be possible to set a cookie and check if it exists but is there another - maybe even better - way?

推荐答案

我认为您的意思是第一次在给定的计算机上进行操作,这不同于给定文档中的第一次访问或给定用户的首次访问.在这种情况下,cookie或本地存储可能是您最简单/最顺畅的策略.如果您的加载项无论如何都将在服务器端存储购买者/客户/用户,那么您也可以在该存储中使用标记.此 SharePoint教程是服务器端策略的示例.

I take it that you mean first time on a given computer, as distinct from first time in a given document or first time by a given user. In that case, the cookie, or local storage, is probably your easiest/smoothest strategy. If your add-in is going to have a server-side storage of purchasers/clients/users anyway, then you could also use a flag in that storage. This SharePoint tutorial is an example of a server-side strategy.

这篇关于是否有最佳实践来检测应用程序的首次运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆