web-push-php
web-push-php copied to clipboard
size of payload must not be greater than 4078 octets
Sometimes this error appears on some transmissions, although it successfully sends the same message to other people What is the cause of this error and how do I correct it Help please
Hello, There are not real standards for push notification services, and some does not support this playload lenght. If affects the push behavior on some browsers as Firefox for Android. Reducing the playload lenght and automatic padding can be a solution :
$webPush = new WebPush();
$webPush->setAutomaticPadding(2048);
Yes, see #108