Click here to Skip to main content
16,012,508 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Is there any way to check a requested page is completely open by browser?

suppose i open www.google.com, it takes time to load completely on browser, Is there any way to know it is open completely?
Posted
Comments
F-ES Sitecore 23-Mar-15 11:41am    
You'll need to give some context, do you have an app that is monitoring a browser application? Does it have a browser embedded in it? Is your code running as part of an asp.net site?
Sergey Alexandrovich Kryukov 23-Mar-15 12:01pm    
Why checking it up? Right approach is to handle the event when the rendering is complete.
—SA

You're not specific about your application and exactly what you're doing, so a guess is about the best you're going to get. Overall, depending on application type, no, there is no way for your code to know if a page is completely loaded in another process (browser).
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Mar-15 12:06pm    
You are right, 5, but it would be more helpful to explain that this is not really needed.
Please see my answer.
—SA
Dave Kreskowiak 23-Mar-15 14:50pm    
Like I said, he didn't explain what he was doing with this so every answer he gets is just a guess.
This is never needed. What would you do if you find that some page is not yet fully loaded. Instead, you should handle the event.

In particular, you can respond to the event onload of HTML body:
http://www.w3schools.com/tags/ev_onload.asp[^],
http://www.w3schools.com/tags/tag_body.asp[^].

It is most conveniently handled by jQuery: https://learn.jquery.com/about-jquery/how-jquery-works[^].

You can start with this page if you need to learn jQuery (highly recommended); see also:
https://learn.jquery.com[^],
http://api.jquery.com[^],
https://jquery.com[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900