shinsenter / defer.php

🚀 A PHP library that focuses on minimizing payload size of HTML document and optimizing page speed.
https://github.com/shinsenter/defer.php
MIT License
40 stars 6 forks source link

found a Broken Script #36

Closed BlackKite84 closed 5 years ago

BlackKite84 commented 5 years ago

I have found a Script thats Broken all (No Console Error)

Before 001 Code-> https://paste.ee/p/ePXqY

After 002 Code-> https://paste.ee/p/aThOO

Setting

      // Library injection
      $defer->append_defer_js     = true;
      $defer->default_defer_time  = 10;

      // Page optimizations
      $defer->enable_preloading   = false;
      $defer->enable_dns_prefetch = false;
      $defer->fix_render_blocking = false;
      $defer->minify_output_html  = false;

      // Tag optimizations
      $defer->enable_defer_css        = false;
      $defer->enable_defer_scripts    = false;
      $defer->enable_defer_images     = false;
      $defer->enable_defer_iframes    = false;
      $defer->enable_defer_background = false;
      $defer->enable_defer_fallback   = false;

      // Web-font optimizations
      $defer->defer_web_fonts = false;

      // Image and iframe placeholders
      $defer->empty_gif               = '';
      $defer->empty_src               = '';
      $defer->use_color_placeholder   = false;
      $defer->use_css_fadein_effects  = false;

      // Blacklist
      $defer->do_not_optimize = [
          'document\.write\s*\(',
          '(jquery([-_][\d\.]+)?(\.min)?\.js|jquery-core)',
          'partner',
          'styleLogo'
      ];
shinsenter commented 5 years ago

Thank you. I will improve that in the next version

shinsenter commented 5 years ago

@BlackKite84 The issue was fixed in version 1.0.11: https://github.com/shinsenter/defer.php/tree/1.0.11