3

I'm using YQL in my webpage (it should run on IE6-IE9).
I'm creating a dynamic script element and setting its source to a YQL query URL.

When I'm loading my webpage at the first time it works great and IE retrieves the latest data.

However, when I'm deleting the element and recreating it (with the exact same URL), IE uses its local cache and fails to deliver the latest data.
When trying to view in fiddler, i don't see any HTTP response (no 200, 304... nothing), which means that the response is retrieved from the local cache.

The common solution is using "cachebusting", such as suggested at: How to force IE to reload javascript?
However, according to YQL Blog's article, cachebusting (adding a "&rand=1234" at the end of the URL) is not recommended.

Does anyone know how to avoid cachebusting and still force IE to reload the script element?

thanks,

Community
  • 1
  • 1
Bagelzone Ha'bonè
  • 1,192
  • 1
  • 14
  • 29

1 Answers1

0

I've had luck setting these two headers:

Pragma: no-cache
If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT
circusbred
  • 1,240
  • 8
  • 8