2

The folks who use ColdFusion and serversideincludes are having issues with excessive recrawls on dynamic pages because there is no datelastmodfied set, which causes excessive server traffic. You can laugh if you want, but when I tell them the solution is setting a last modified date on the pages I get a universal huh? how do you do that? I opened a case with google originally and was told that yep, it's a page date problem. I have done a lot of research to try and find how to code this in the header and most of what I found talked about pulling a date from a page. I did determine that it probably could be done using the CFHEADER tag. I'm just not sure about implementing. Can I tell them that adding something like

<cfheader NAME="datelastmodified="Mon, 01 Feb 2013 08:00:00 GMT">

will suffice? Not sure about the date format, if the day name is required. Have I tried just asking one of the webmasters to try this? No I haven't. I would like to know that I am at least on the right track before taking up too much of their time. And so far none of them have come up with a solution on their own other than useing robots.txt to block the crawl or things along those lines. Any suggestions or thoughts would be appreciated.

4

2 回答 2

8

幸运的是,这些事情都不需要神秘,因为它们都有据可查。

这一切都在暗示这种事情:

<cfheader name="Last-Modified" value="#getHttpTimeString(now())#"> <!--- although use some timestamp indicating when the content of the page was last updated,which would be a system-specific sort of thing --->

注意:直到大约 5 分钟前我用谷歌搜索它之前,我不知道任何细节。

于 2013-05-28T07:40:17.247 回答
1

Google 的爬虫确实倾向于尊重他们遇到的页面的元标记详细信息和 HTTP 响应值,并且在 CF 中设置此类的方法确实是使用 CFHEADER 标记。您需要将其制作成如下所示:

<CFHEADER NAME="Last-Modified" VALUE="#DateFormat(now (), 'ddd, dd mmm yyyy')#   #TimeFormat(now(), 'HH:mm:ss')# GMT#gmt#">
<CFHEADER NAME="Expires" VALUE="Mon, 10 Mar 2013 05:00:00 GMT">

您可能希望 CF 开发人员来完成这项工作,因为我在这里向您展示了两个日期时间值的示例。第一个将其动态设置为现在(使用 DateFormat() 和 Now() 函数),第二个示例使用硬编码日期设置 Expires 标头值。

您可能希望同时包含 last-modified 和 expires 标签,并决定是否希望应用到每个标签的日期是动态的或硬编码的。

于 2013-05-28T13:59:10.367 回答