Can I get via javascript the HTTP expires header of a HTTP resource? -


my page needs know when cache included javascript file expire, retrieve again.

the xmlhttprequest object has getresponseheader method can call:

// following script: var client = new xmlhttprequest(); client.open("get", "test.txt", true); client.send(); client.onreadystatechange = function() {     if (this.readystate == 2) {         alert(client.getresponseheader("expires"));     } } 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -