2008-09-26 16 views
1

這是一個新的gmail實驗室功能,可以讓你指定一個RSS源來抓取隨機引號以附加到你的電子郵件簽名。我想用它來根據我傳入的參數,當前時間等以編程方式生成簽名(例如,我在松樹中有一個腳本,用於追加當前McCain和Obama獲勝的概率,從intrade的API中獲取。 )但是,看起來gmail緩存了你指定的URL的內容。任何方式來控制或任何人知道gmail看URL的頻率?是否可以將gmail的隨機簽名 - 來自RSS-feed用於真正的動態簽名?

謝謝!

添加:這裏是我用來測試這個程序。該文件位於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) 

回答

1

你也許能夠做一些對客戶方,看看這個greasemonkey script隨機地增加了一個簽名。由於它在你的控制之下,而不是谷歌的,你可以控制它是否緩存。

+0

謝謝!好點子。我想到一個普通用戶的應用程序,但我認爲greasemonkey對他們來說是一個障礙。如果他們可以在他們的設置中指定一個URL,那會很好... – dreeves 2008-09-26 22:24:35

+0

我認爲還有一種將greasemonkey腳本捆綁到獨立的firefox插件中的方法。我不知道它是如何參與的。 – davr 2008-09-26 22:41:04

相關問題