> I want to build a personal widget that will watch a webpage 
> and notify me when it is updated/changed.
> 
> I presume a quick and easy way to do this would be to read 
> the page with <cfhttp ...> sort the chfttp.fileContent and 
> compare this to future cfhttp reads.
> 
> It was mentioned in other threads about comparing large 
> strings like this maybe more efficient my hashing them with 
> md3? Or something like that?  Is that just using the hash() 
> function, or do I need to do something more complex?

Ideally, you shouldn't have to fetch the page at all. You should be able to
send an HEAD request (rather than GET or POST) with CFHTTP. This will return
HTTP response headers. One of those should be "Last-Modified"; another is
"ETag". You can use either (or both) to see if the page has been changed
since the last time you requested it. Alternatively, you can send a GET
request, and include an If-Modified-Since header; the remote server will
send an HTTP 304 status code if the page hasn't been changed since the value
in your header.

http://fishbowl.pastiche.org/2002/10/21/http_conditional_get_for_rss_hackers

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258646
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to