last-modified

ASP.NET MVC getting last modified date/FileInfo of View

I'm required to include the last modified date on every page of my applications at work. I used to do this by including a reference to <%= LastModified %> at the bottom of my WebForms master page which would return the last modified date of the current .aspx page. My code would even check the associated .aspx.cs file, compare the last mo...

Is there something like Perl's Win32::FileNotify for Linux or OS X?

I've been using Win32::FileNotify on Windows, and I was curious to know if there were something similar for Linux and OS X. I haven't been able to find such a module using Google. Does anyone here know of such a thing? ...

how to tell when a HTTP web page has changed when it is of type html/text?

Hi, I'm trying to work out the algorithm to tell if non-binary files on the web have changed or not. I was going to go with: LastModified datetime from header, and then if these aren't present fallback to ContentLength from header I'm finding however that for alot of websites the LastModified for the HTML pages are actually just...

How can I update a setting based on the build?

I have developed a HTTP resource, that uses the Last-Modified header, and it should reflect any modifications made to the application. I would like to update this field to tell the build date, or the last application update date. Here is some solutions I have thought of: Use a build script to change a DateTime setting whenever the app...

How do I get the last modification time of a Java resource?

Can someone please tell me a reliable way to get the last modification time of a Java resource? The resource can be a file or an entry in a JAR. ...

How do I find the last modified file in a directory in Java?

How do I find the last modified file in a directory in java? ...

Search EWS CalendarItems with last modified time

I'm searching CalendarItems with ExchangeWebServices..In msdn document there is a field as LastModifiedTime. How do I query CalendarItems by LastModifiedTime with ExchangeServerBindings ? ...

Set "Last-Modified" Header to "Date-Modified" of File in ASP.NET MVC ?

Hi Guys, I am trying to figure out in ASP.NET MVC how to optimize getting the "Date modified" to use in the last-modified header in ASP.NET MVC. I dont want to check the date of each request as this seems loss of performance. Basically, at the moment I am using "Release Date" for date-modified, but the problem here is that everytime ...

The last modified time of a file is a 13 digit number. What does it mean?

long lastmodify = f.lastModified(); System.out.println("File Lost Modify:"+lastmodify); I am running the above code of file("f"), but it displays the last modified time is:1267082998588 I am confusing, is this is time or not.? Actually what it is? ...

htaccess 'Header unset Last-Modified' caching issue

Hi, Im trying to set up some cache control options in my htaccess file. At the moment it looks like this: <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf|css|js|html|pdf)$"> Header set Cache-Control "max-age=2592000, public, must-revalidate" Header unset ETag FileETag None </FilesMatch> However I read about (and wanted to add) Header u...

Finding file size and last modified of SFTP file using Java

I'm using JSch to get files from an SFTP server, but I'm trying to figure out a way to only get the oldest file, and to make sure that it is not currently being written to. The way I imagine myself doing this is first finding which file in the specified remote folder is oldest. I would then check the file size, wait x seconds (probably a...

Vbscript - Compare and copy files from folder if newer than destination files

Hi, I'm trying to design this script that's supposed to be used as a part of a logon script for alot of users. And this script is basically supposed to take a source folder and destination folder as basically just make sure that the destination folder has the exact same content as the source folder. But only copy if the datemodified stam...

Robocopy - Compare modified dates of files?

Hi, I've been trying to create this script that basically mirrors two sets of folders and it's content (including subfolders), but only copy files that are newer than the ones that already exist. I tried doing this by writing a vbscript, but it turns out that I manualle need to scan each subfolder and then it's content. And then that sub...

HTTP headers: Last-Modified - how can it mimimize server load?

Imagine the following use case: I use an AJAX request for getting some info about Item and use this URL: http://domain/items/show/1 In my database all items have a field called modified_at where we store the moment when this item was previously modified. How can Last-Modified server HTTP header in response can minimize load/reduce req...

(Weak) ETags and Last-Modified

As far as I understand the specs, the ETag, which was introduced in RFC 2616 (HTTP/1.1) is a predecessor of the Last-Modified-Header, which is proposet to give the software-architect more controll over the cache-revalidating process. If both Cache-Validation-Headers (If-None-Match and If-Modified-Since) are present, according to RFC 261...

how to use getLastModified() in android for XML file creation/modicfication date check

hi, I am parsing XML file in my android application, but I like to modify the code, that it only parses the XML file if it is update (I will store the last successful parse date). I found out the urlConnection.getLastModified(); but not getting proper idea of how to use it, as it is returning milliseconds as long. is it possible I c...

.Net overwrite file if newer

My application checks on startup if there is a newer version of a file on a shared network drive. If the one on the network share is newer it copies it to the local application directory and overwrites the old one. My current code to do this goes something like this: FileInfo sourceFile = new FileInfo(source + "\\" + fileName); if(sourc...

How to get the file with latest lastModified date, in Java?

I have a directory of files that I need to check for changes. I consider it changed when one of the files has a modifiedDate newer than what I remembered from the last check (this is meant to be a cache dependency). What would be the fastest way of finding the latest modified file in a directory in Java? Maybe I'm too optimistic, bu...

Android: Getting lastModified of a private file

Hi Guys, I am trying to get the last modified date of an internal file and it always returns me 0 although I could read the file properly. Can you please let me know if I am doing anything wrong... Creating a file... FileOutputStream Os = activity.openFileOutput("file1.jpg", Context.MODE_PRIVATE); cachedImage.compress(CompressFormat.J...

Getting last modified info from files with PHP when filemtime, stat['mtime'], and get_headers fail

I'm trying to display images in the reverse order of when they were last modified. Unfortunately, get_headers() seems to only work for urls, and both stat['mtime'] and filemtime() fail for me. Are there any other ways for me to get the last modified info for a file? Here's my code at the moment: if (isset($_GET['start']) && "true" ==...