last-modified

last-modified header and linux file system

hi guys, im using httpclient and last-modified header in order to retrieve the last updated date of an html file however when i try this on a linux box it returns yesterdays date but when i use a windows machine it returns todays date. is anyone aware of issues using this header field in linux? ...

How can I find the newest created file in a directory?

Is there an elegant way in Perl to find the newest file in a directory (newest by modification date)? What I have so far is searching for the files I need, and for each one get it's modification time, push into an array containing the filename, modification time, then sort it. There must be a better way. ...

Last Updated Date: Antipattern?

I keep seeing questions floating through that make reference to a column in a database table named something like DateLastUpdated. I don't get it. The only companion field I've ever seen is LastUpdateUserId or such. There's never an indicator about why the update took place; or even what the update was. On top of that, this field is so...

How to change the file's permission and last modified in Java?

To my knowledge, Java's File class does not support to change the file's permission and last modified date. Is there any proper way to do this in a cross-platform style? ...

Can a sql table be used to generate a hash? [sqlserver2005]

I'd like to take a table, generate it's hash string, store it, then compare it at a later predefined time and see if it matches, if not take note of the modification time and store that with the new change date. This is because I believe an on insert trigger would cause a bad slow down if a batch of over 5000+ insert statements is submi...

How to check if directory contents has changed with PHP?

I'm writing a photo gallery script in PHP and have a single directory where the user will store their pictures. I'm attempting to set up page caching and have the cache refresh only if the contents of the directory has changed. I thought I could do this by caching the last modified time of the directory using the filemtime() function a...

How to customize Last-Modified Header in Joomla?

Even in the latest Joomla 1.5 Last-Modified Header is non-customizable and returns current date, which is imho against seo-basics. Does any one know how (or component) to make Joomla 1.5 return Last-Modified header based on last modified article? ...

Apache2 mod_perl Last-Modified header ignored

I have a perl generated page. The contents of this page change every 30 minutes, so I'm setting $r->set_last_modified() to the time the contents last changed. That all works well and I can see the correct header arriving at my browser. When I refresh the page, I see my browser uses the correct "If-Modified-Since" header in the request ...

What takes precedence: the ETag or Last-Modified HTTP header?

For two subsequent requests, which of the following two headers is given more weight by browsers should one of them change: ETag or Last-Modified? ...

.htaccess not working - only caching images and not JS or CSS

Duplicate: Why isn’t my javascript & css caching ? I'm noticing that I'm only receiving 304 HTTP codes (cached content) for images but not JavaScript or CSS. My .htaccess file is: Options -Indexes Options +FollowSymLinks # Enable ETag FileETag MTime Size # Set expiration header ExpiresActive on ExpiresDefault "access plus 1 w...

MySQL table modified timestamp

I have a test server that uses data from a test database. When I'm done testing, it gets moved to the live database. The problem is, I have other projects that rely on the data now in production, so I have to run a script that grabs the data from the tables I need, deletes the data in the test DB and inserts the data from the live DB. ...

Get last modified and other file info from remote server with PHP

A weekly mp3 is uploaded to an external server. I manually copy this to my server and link it for podcasting and archive etc. The external file is then replaced the following week. I can copy the file directly to my server when available: copy("http://source.com/file.mp3", "newfile.mp3"); I need to know when the file is available b...

How to check if a static file in web server is updated or not?

Any Java API in client side can check its modified date? ...

Automatically add Last-Modified header IIS?

Is there an ISAPI filter that can automatically add the Last-Modified header in IIS? ...

C# find most recent file in dir

I need to find the most recently modified file in a directory. I know I can loop through every file in a folder and compare File.GetLastWriteTime but is there a better way to do this without looping? ...

how to enable Last-Modified header for static resources served by Google App Engine (Java version)?

Is there a way to turn on the Last-Modified header for static resources served up by Google App Engine? I have a large zip file that my app serves up to an iPhone client app, and I'd like to only download it if the Last-Modified date indicates that it is newer than the cached copy on the iPhone. PS: I am using the Java version of Goog...

Why is the PHP get_headers() Last-Modified different from the apache file info

I have an Apache directory listing of files on a remote server (in Australia/Adelaide +930) I have no control over. This server shows the correct last modified date of a file as: 14-Aug-2009 09:41 I have a PHP script on my US server to check the date of the remote file. get_headers()['Last-Modified'] returns: Fri, 14 Aug 2009 00:11:11 G...

mod_rewrite RewriteCond based on Last-modified? (.htaccess)

I know that we can easily base a RewriteCond on any http request header. But can we check (some of) the response headers that are going to be sent? In particular, the Last-modified one? I want to rewrite a url only when the Last-modified date is older than 30 minutes and I'm trying to avoid the overhead of delegating that check to a php...

What are the effects of the Last Modifed Header (LMH) changing too often on a dynamic site?

We have a web application that has a defect and is updating all pages Last Modified Header to the date of the last publish. We are in the process of fixing the defect, but we wanted to know if this defect might impact our SE results for this site. Basically each time a page on the site get's updated all pages updates the last modifie...

Can a Class in Java determine if it has been modifier?

I have, a Starter.class which updates some classes when needed, then instantiate and runs a Client class. Is it possible (if yes, how) for the instance of Class to know if it has been modified since the last call? The modification is only a minor one and most of the methods stay identical. May be getting the date of last modification ...