I have a page that runs an ajax function that does an xmlhttprequest(). The page works perfectly, except for when I add php headers to prevent the page from being cached.
When I add those headers, from time to time the page loads EXTREMELY slowly. For example, if you're on some external page, and you click a link to go to this page, it doesn't jump to the page for 30 seconds or so. This is not due to the fact that the page isn't being cached, as it takes an exeedingly long time.
The problem only happens every now and then, not consistently, which is making it really hard to figure out! When I remove the php headers from the page, it works without any problem. Also, when I remove the ajax from the page, it works without any problem.
So, there is something that is going on between this ajax code, and the php headers.
Any ideas would be greatly appreciated, as I've been stuck on this for a couple weeks now.
Many thanks...