Apple browsers do not pass cookie in loadable items

The script is written in PHP. At the first (there is no information from the site in the browser yet) document request, the server sends a cookie

if(isset($_COOKIE['PHPSESSID']))
  session_id($_COOKIE['PHPSESSID']);
session_start();

then the whole document

exit($variable);

There are elements in the document (for example img) upon request of which these COOKIES should be sent, but they are not sent. If the element is reloaded for example via js, then everything will go. The problem is with Apple in the first connection (dock request).