Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Page source discrepancy in EO Webbrowser Options
Louis
Posted: Sunday, April 16, 2017 4:24:24 PM
Rank: Member
Groups: Member

Joined: 6/20/2016
Posts: 13
On a particular website if I view the source using EO webbrowser, the script tags are all empty, for example:

<script type="application/json" id="jsInit1"></script>

However if I view that same page in my regular Chrome browser, there is a lot of source code inbetween those script tags.

Is there a reason why I can't access that using the EO browser?

In particular this happens to me when performing a search on Pinterest.com, eg.:

https://pinterest.com/search/pins/?q=marketing
eo_support
Posted: Monday, April 17, 2017 2:22:21 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,668
Hi,

This is because the JavaScript code inside the page explicitly cleared the data inside the jsInit1 tag. EO.WebBrowser's GetHtml function is not exactly Chrome's "View Source" function. Chrome's view source issue a direct fetch to the server again and skips the HTML parser so that whatever contents it received from the server is directly displayed. EO.WebBrowser's GetHtml generates the HTML from the current DOM tree, thus representing the current stage of the page without issuing another request to the server. Since there are script code inside the page that explicitly clears these tags, you won't see the contents of these tags.

Currently we do not have a direct equivalent of Chromium's view source feature. We will look into this and see if we can add it in a future build.

Thanks!
Louis
Posted: Tuesday, April 18, 2017 2:26:51 AM
Rank: Member
Groups: Member

Joined: 6/20/2016
Posts: 13
Thanks for the clarification, much appreciated!
eo_support
Posted: Friday, April 21, 2017 11:32:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,668
Hi,

We have added this method for you to get page source:

https://www.essentialobjects.com/doc/eo.webbrowser.webview.getsource.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.