SPATIE

  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Docs Browsershot Miscellaneous-options Performance

Other versions for crawler v4 v3
    • Introduction
    • Support us
    • Requirements
    • Installation & setup
    • Upgrading
    • Questions and issues
    • Changelog
    • About us

    Usage

    • Introduction
    • Creating images
    • Creating PDFs
    • Creating HTML

    Miscellaneous options

    • Adding extra headers to every request
    • Adding extra headers to the navigational request
    • Changing the language of the browser
    • Changing the value of a dropdown
    • Clicking on the page
    • Connection to a remote chromium/chrome instance
    • Disable sandboxing
    • Fixing cors issues
    • Getting console output
    • Getting failed requests
    • Ignore HTTPS errors
    • Passing environment variables to the browser
    • Performance
    • Prevent unsuccessful responses
    • Sending POST requests
    • Setting an arbitrary option
    • Setting the CSS media type of the page
    • Setting the timeout
    • Setting the user agent
    • Specifying-a-proxy-server
    • Typing on the page
    • Using a pipe instead of a WebSocket
    • Using cookies
    • Using HTTP Authentication
    • Using url for html content
    • Writing options to a file
    • Disabling redirects
    • Read redirect history

Performance

The default behavior of the browsershot is to capture requested addresses. So when you use data urls on the HTML document , this capturing is not good for memory because more addresses consume more memory.

You can disable this option by calling disableCaptureURLs().

Browsershot
    ::html('More data urls exists in this document')
    ->disableCaptureURLs()
;
Passing environment variables to the browser
Prevent unsuccessful responses
Help us improve this page
Writing Readable PHP

Learn everything about maintainable code in our online course

Help us improve this page
  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Kruikstraat 22, Box 12
2018 Antwerp, Belgium
info@spatie.be
+32 3 292 56 79
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • Bluesky
  • Mastodon
  • YouTube
  • Privacy
  • Disclaimer

+32 3 292 56 79

Click to call us

    Enter a search term to find results in the documentation.