How to downlaod ajaxed pages with WinInet
I am using WinInet for downloading webpages in my small C++ program. With the increased use of Ajaxed pages (urls with hashbang), the download does not work good. Instead of getting the current state of the page, I always get the previous state.
Is there some ways to handle it with WinInet? Are there any other libraries or specific proc开发者_运维百科edures to follow? Should I integrate a javascript engine as well to do the job.
Will appreciate any help or sample code to handle this in a C++ Program.
Thanks!
You are probably falling victim to the cache, especially with # in the URL. Try INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE (ignore cache and reload from network | do not bother writing response to cache) for dwFlags in HttpOpenRequest or InternetOpenURL.
精彩评论