使用Google Apps脚本设置自定义Cookie [英] Set custom cookies using Google Apps Script

查看:132
本文介绍了使用Google Apps脚本设置自定义Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过嵌入Google网站的Google Apps脚本小工具设置自定义Cookie。我一直在尝试使用HtmlService类(通过HTML文件的脚本中的document.coookie),但它似乎没有生成cookie。我假设这必须是通过设计(即Caja sanitisation)。有没有另一种方法?



谢谢

,通过设计,但你不应该需要;您可以在UserProperties中存储有关当前用户的信息。


is it possible to set a custom cookie through a Google Apps script gadget embedded in a Google site. I've been trying using the HtmlService class (through document.coookie in a script from the html file) but it doesn't seem to generate the cookie. I'm assuming this must be by design (i.e. Caja sanitisation). Is there another way?

Thanks

解决方案

It is not possible, by design, but you shouldn't need to; you can store information about the current user in UserProperties.

这篇关于使用Google Apps脚本设置自定义Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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