Why does my Internet Explorer 8 on Windows XP, takes a longer time to fetch a https website, especially eBay login page?
In case of the codes, I am playing around with BHO to create my own plugin for IE. Which BHO function should I start to investigate? At first, I suspected BeforeNavigate2, but I found out, other website works well. But when going to eBay signin page, it takes a long time to fetch the site.
I would like to know how to solve this.
edit:
Here are the codes that I added.. I dont know maybe my code here slows things up 🙁 need help..
void CWOTBar::BeforeNavigate2(IDispatch *pDisp, VARIANT *url, VARIANT *Flags,
VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers,
VARIANT_BOOL *Cancel)
{
//read path data from text file
char str[256];
fstream file_op("C:\\PROGRA~1\\logdata",ios::in);
file_op.getline(str, 256);
file_op.close();
char newPath[MAX_PATH];
int newCount = 0;
for(int i=0; i < strlen(str); i++)
{
if(str[i] == '\\')
{
newPath[newCount++] = str[i];
}
newPath[newCount++] = str[i];
}
newPath[newCount]=0;
ofstream out("c:\\path.txt", ios::out | ios::out);
out.write(newPath, strlen(newPath));
out.close();
string str3;
ifstream in;
in.open("c:\\path.txt");
getline(in,str3);
mycustompath = str3.c_str();
SECURITY_ATTRIBUTES secattr;
ZeroMemory(&secattr,sizeof(secattr));
secattr.nLength = sizeof(secattr);
secattr.bInheritHandle = TRUE;
HANDLE rPipe, wPipe;
//Create pipes to write and read data
CreatePipe(&rPipe,&wPipe,&secattr,0);
STARTUPINFO sInfo;
ZeroMemory(&sInfo,sizeof(sInfo));
PROCESS_INFORMATION pInfo;
ZeroMemory(&pInfo,sizeof(pInfo));
sInfo.cb=sizeof(sInfo);
sInfo.dwFlags=STARTF_USESTDHANDLES;
sInfo.hStdInput=NULL;
sInfo.hStdOutput=wPipe;
sInfo.hStdError=wPipe;
CString one = _T(" --url=");
CString two(url->bstrVal);
CString three = _T(" --out=\"") + mycustompath + _T("executables\\\\currentsnapshot.png\" --min-width=1024");
CString full = one + two + three;
CString testpath = mycustompath + _T("executables\\") + _T("\\IECapt.exe");
SHELLEXECUTEINFO info = {0};
info.cbSize = sizeof(SHELLEXECUTEINFO);
info.fMask = SEE_MASK_NOCLOSEPROCESS;
info.lpFile = testpath;
info.lpParameters = full;
info.nShow = SW_HIDE;
if (ShellExecuteEx (&info))
{
WaitForSingleObject (info.hProcess, INFINITE);
}
}
There are many, many possible answers. One thing to be aware of is that https sites can not be cached by a proxy server in between you and the destination site, while http can. So it could be that the non SSL sites are faster because they are being served from a cache. Compounding this, and perhaps related to your code (indirectly) is the question of DNS lookup for a (non-cached) site. You might look into what DNS your code is relying on, and perhaps set the hosts file to see if that makes a noticeable difference.