# Determine modification time of remote (http) file

**URL:** <https://www.ruby-forum.com/t/determine-modification-time-of-remote-http-file/158048>\
**Category:** Rails\
**Created:** [January 18, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/determine-modification-time-of-remote-http-file/158048 "2009-01-18T15:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffrey\_LSTaylor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Post date:** [January 18, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/determine-modification-time-of-remote-http-file/158048/1 "2009-01-18T15:33:57Z")

</div>

Is there way to determine the last modification time of a file via HTTP?  
Specifically, I’d like to not download or parse a very large RSS file  
(300+  
items) if it hasn’t changed.

TIA,  
Jeffrey

---

<div class="post-metadata">

**Author:** ![Jeffrey\_LSTaylor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Post date:** [January 19, 2009, 1:36pm UTC](https://www.ruby-forum.com/t/determine-modification-time-of-remote-http-file/158048/2 "2009-01-19T13:36:02Z")

</div>

Hi,

there is 304 HTTP response code that says “not modified”. However,  
you’ll not be able to use it unless RSS file provider is actually  
serving this response to you. I know apache for static files does just  
that, but if on the other end is application that doesn’t provide  
caching for RSS feeds (sic!) you’re toast.

H.

---

<div class="post-metadata">

**Author:** ![Jeffrey\_LSTaylor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Post date:** [January 19, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/determine-modification-time-of-remote-http-file/158048/3 "2009-01-19T14:44:41Z")

</div>

Quoting Hubert ÅÄ™picki [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi,
> 
> there is 304 HTTP response code that says “not modified”. However,  
> you’ll not be able to use it unless RSS file provider is actually  
> serving this response to you. I know apache for static files does just  
> that, but if on the other end is application that doesn’t provide  
> caching for RSS feeds (sic!) you’re toast.

Thank you. I tried using the -N flag of wget on the largest feed and it  
doesn’t appear to support the last\_modified meta tag (or whatever it’s  
called,  
I’m still learning). I may eventually implement the feature, but it  
won’t  
help with the immediate problem.

Thanks,  
Jeffrey
