这是一个新的Gmail实验室功能,可让您指定RSS源以抓取随机引号以附加到您的电子邮件签名。我想使用它来根据我传入的参数,当前时间等以编程方式生成签名。(例如,我有一个松树脚本,附加了McCain和Obama获胜的当前概率,取自intrade的API。请参阅下文。)但似乎gmail缓存了您指定的URL的内容。有任何方法可以控制或者任何人知道gmail查看URL的频率吗?
ADDED:这是我用来测试它的程序。此文件位于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>dreeves@kibotzer.com</webMaster>
<managingEditor>dreeves@kibotzer.com (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)
答案 0 :(得分:1)
您可以在客户端执行某些操作,请查看随机添加签名的greasemonkey script。由于它在您的控制之下,而不是谷歌的,您可以控制它是否缓存。
答案 1 :(得分:1)
尝试设置Cache-Control: no-cache和Pragma: no-cache HTTP标头。如果谷歌的签名代码尊重其中任何一个标题,那么你会很幸运。