Use hook_page_build() instead of hook_init() to add CSS or JS to every page. The reason is that hook_init() runs on every request that goes to Drupal (AJAX requests, private file requests, boost / varnish requests etc.), but hook_page_build() runs only when delivering HTML.
Source code viewer
/** * Implements hook_page_build(). */ function hook_page_build(&$page) { }Programming Language: PHP