Skip to main content

Client-side processing

Answered

Comments

3 comments

  • Official comment
    Nguyễn An Thuận

    Hi Alden,

    It's possible, but it'll require more server resources. It's not scalable either. We're sending thousands of HTTP requests every minute, but I don't think our servers are enough to launch a few hundred browser instances, even headless browser for really short web visits.

    However, you may try some website screenshot takers service with an API URL, so you can set cronjob with their endpoint and pass parameters via POST data.

    I've justed phantomjscloud.com service, and it seems working. WARNING: I do not own nor operate the service, and can't guarantee its availability/reliability in the long run.

    For example, I set cronjob with this URL:

    http://PhantomJScloud.com/api/browser/v2/a-demo-key-with-low-quota-per-ip-address/

    then at section Send HTTP Request, select HTTP Method: POST, enter

    { "url":"http://example.com", "renderType":"plainText" }

    into POST Data field, and Save cronjob.

    It will load and render your URL, execute JavaScript, and render as plain text.

    It gives away 500 pages a day (each page = 2 seconds AND 50KB) with its free account, so I guess it's fine if you set cronjob to run once or twice a day.

    I hope this helps.

  • Alden Gannon

    I've done a workaround by doing each http post manually.  Works for simple pages, but could quickly get very complicated.  Better to simply have a browser instance.

    0
  • Alden Gannon

    Actually, this looks like a great solution.  I'll look into it.  Thanks!

    0

Please sign in to leave a comment.