CodeIgniter Forums
Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) (/thread-32637.html)

Pages: 1 2


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]Patrick Truyens[/eluser]
Hi,

I do have a problem that the contents of my page is loaded fast enough (less than 1 sec.), but it takes about 5 seconds before IE thinks that the page is loaded.

Analysis of the network traffic reveiled that it takes about 5 seconds after the last message that the [FIN, ACK] package is send. (= closing of the socket used for the page-request.)

Anyone an idea how I could force CI or PHP to close the connection faster?

ps.: I am using Windows2003 server, PHP5, with SSL encryption (https://)

Thanks!
Patrick.


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
Get yourself Firefox, and the Firebug extension. The menu option 'net' will tell you exactly where the browser spends its time until domready...


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]Patrick Truyens[/eluser]
Hi WanWizard,

Thanks for your reply,
But if I get Firefox and the extension, I could see where the browser spends its time. I will look for it, as it might help, but my intuition tells me that the server spends some time in waiting for something before sending a ACK.

If I look at the first message after the delay of 5 sec in WireShark, it states (besides all hex details...):
[The RTT to ACK the segment was: 5.098833000 seconds]

So I blame my server-side.

For test I made a plain html-page with EXACLY the same content (compared with "view source"), and that loads instantly!

I really hope that someone has some clues where I have to look for. I do have a javascript that triggers only after the complete loading of the page. So it is important to me.


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
The server is the sender, so it shouldn't sent the ACK, the client sends the ACK.

I've seen cases where no length was specified in the http header (happens when you have compression enabled), and the browser kept on waiting for data.

Does this happen only on this page? Or on every page? Does it also happen when you use http instead of https?


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]Patrick Truyens[/eluser]
Hi,

Yes, I have it on all my pages in this project.
I have no other project yet, so could not test on that.

I placed the site under HTTP: instead of HTTPS:
This makes it easyer to follow the message-stream between the server and the client.

The message that is send by the server, 5 seconds too late, is the "HTTP/1.1 200 OK" message, indicating that all data is sent OK.

I hope this might give a clue.


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
Are you using IIS or Apache?


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]Patrick Truyens[/eluser]
I am using IIS


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
Ok. Do you have ISA server installed on that same machine by any chance?


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]Patrick Truyens[/eluser]
No, but I do have IIS and Remote access/VPN on it.


Page is loaded OK long before the browser thinks it's all loaded (= 5 sec later) - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
Is this a local machine to which you have direct (network) access, or is it remote (via the internet, through firewalls, etc)?