How to get heavy javascript pages from chrome extension

I am developing an extension that selects pages that a user can access on a website. My extension uses jQuery.get () to fetch the page. This works correctly for a site such as amazon.com.

But if the user logs into gmail, and I try to extract some other pages, such as "account settings", I get an incomplete page. Somewhere on this page I get a message:

"Your browser does not support Javascript or Javascript has been disabled. Since your browser does not support Javascript or I have Javascript disabled, we cannot display the requested page."

Is there a way to get a full page in such cases?

+3
source share
1 answer

As a result, I opened a new tab and extracted the page on this tab. Then, using the content script, I analyze the page data. Of course, this is a problem in the sense that the user sees a newly opened tab. But then it is also transparent to the user.

If you are developing an extension in Firefox using Jetpack, you can use page-worker, which is an invisible page and provides access to the DOM.

+1
source

Source: https://habr.com/ru/post/1492939/


All Articles