Using jQuery's $.getScript(), can I sense 304 Not Modified Headers?
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-03-08T18:31:38Z
Indexed on
2010/03/08
18:51 UTC
Read the original article
Hit count: 375
I have an application (a widget) where I use $.getScript() on a 5 minute timer, loading a file every five minutes. I then take the contents of the file I just downloaded, and rebuild my page, so that my widget can update. Most of the time, however, the file is unchanged, and firebug displays a 304 Not Modified header every 5 minutes, as my timer executes $.getScript().
I would like to sense when the file is not modified, so that I don't use up user resources, rebuilding the page for no reason.
Is it possible to obtain html headers when using $.getScript()?
© Stack Overflow or respective owner