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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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