I'd like to send headers with PHP, inside of a javascript condition. Is that possible?
if ($('body').hasClass('browserChrome')) {
<?php
header("Content-Type: application/x-chrome-extension");
header('Content-Disposition: attachment; filename="http://example.com/file.crx"');
header("Pragma: no-cache");
header("Expires: 0");
?>
}