Skip to content

Custom referrer #696

@waahhhh

Description

@waahhhh

We have the ability to solve issues #530 and #596.
Chrome allows you to define a custom referrer.
See https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigate.

An example using a custom referrer modifying \HeadlessChromium\PageUtils\PageNavigation::__construct():

$this->navigateResponseReader = $page->getSession()->sendMessage(
    new Message('Page.navigate', ['url' => $url, 'referrer' => $referrer])
);

Note that the parameter referrer should not be set by default.
A value like NULL or an empty String causes an error.

It would probably be helpful to use a method that allows you to define the parameters of Page.navigate on your own.
This would make it more flexible, which is necessary if you want to customize the policy.
See https://developer.chrome.com/blog/referrer-policy-new-chrome-default?hl=en for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions