gmail的来自RSS订阅源的随机签名可以用于真正的动态签名吗?
时间:2020-03-06 14:48:44 来源:igfitidea点击:
这是gmail Labs的新功能,可让我们指定RSS提要,以获取随机引号并添加到电子邮件签名中。我想使用它根据传入的参数,当前时间等以编程方式生成签名。(例如,我在pine中有一个脚本,该脚本添加了从intrade的API获取的McCain和Obama获胜的当前概率。如下所示。)但是gmail似乎会缓存我们指定的URL的内容。有什么方法可以控制它,或者任何人都知道gmail浏览该URL的频率?
谢谢!
添加:这是我用来测试的程序。该文件位于http://kibotzer.com/sigs.php。从此处(http://mapki.com/wiki/Dynamic_XML-)获得的无缓存头想法似乎无济于事。
<?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); //XML Header header("content-type:text/xml"); ?> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> <channel> <title>Dynamic Signatures</title> <link>http://kibotzer.com</link> <description>Blah blah</description> <language>en-us</language> <pubDate>26 Sep 2008 02:15:01 -0000</pubDate> <webMaster>[email protected]</webMaster> <managingEditor>[email protected] (Daniel Reeves)</managingEditor> <lastBuildDate>26 Sep 2008 02:15:01 -0000</lastBuildDate> <image> <title>Kibotzer Logo</title> <url>http://kibotzer.com/logos/kibo-logo-1.gif</url> <link>http://kibotzer.com/</link> <width>120</width> <height>60</height> <description>Kibotzer</description> </image> <item> <title> Dynamic Signature 1 (<?php echo gmdate("H:i:s"); ?>) </title> <link>http://kibotzer.com</link> <description>This is the description for Signature 1 (<?php echo gmdate("H:i:s"); ?>) </description> </item> <item> <title> Dynamic Signature 2 (<?php echo gmdate("H:i:s"); ?>) </title> <link>http://kibotzer.com</link> <description>This is the description for Signature 2 (<?php echo gmdate("H:i:s"); ?>) </description> </item> </channel> </rss>
-- http://ai.eecs.umich.edu/people/dreeves - - search://"Daniel Reeves" Latest probabilities from intrade... 42.1% McCain becomes president (last trade 18:07 FRI) 57.0% Obama becomes president (last trade 18:34 FRI) 17.6% US recession in 2008 (last trade 16:24 FRI) 16.1% Overt air strike against Iran in '08 (last trade 17:39 FRI)
解决方案
我们也许可以在客户端上执行某些操作,请看一下这个随机添加签名的油脂猴子脚本。由于它是在控制之下,而不是在Google的控制之下,因此我们可以控制它是否缓存。
尝试设置Cache-Control:no-cache和Pragma:no-cache HTTP标头。如果Google的签名代码支持这些标头之一,那么我们会很幸运。