no-cache tags -
04-03-2006
, 04:18 PM
I have a page that needs to either not be reloaded at all, or totally
reloaded. It has a 1x1 image in it that is thrown by the affiliate
program, so it should only ask for the image one time, regardless of if
the page is reloaded or returned back to by hitting back on the browser.
Now if the page reloads, that is fine, because our code is smart enough
to not ask for the image to be thrown a second time. The problem is as
follows:
If I do not turn caching off, then it works fine for a reload, the page
reloads, the new page does not have the image tag in it, and no second
request is made to the affiliate program. However if I browse to another
page, and hit the back button to return, the browser does NOT ask for
the page again, but DOES ask for the image again, so we log a duplicate
request. I would have expected it to cache the image, so a duplicate
request would not be made for the image.
If I turn off caching using meta statments, then it works fine for a
reload again, as above as expected. But if I browse to a new page, then
back back up, it does NOT reload the page, although caching is off, and
I would think that it should. Now that would not be too big a deal
except it DOES reload the darned image again, creating a second and
incorrect request to the affiliate program.
Are there ANY html tags that can get the browsers to either cache or
not, instead of caching the page, but not the image.
Thanks,
Marshall |