Skip to content

LazyHTML is an OpenSource Javascript Library that Supports Lazy Loading of any elements without Modifying Code, LazyHTML can lazy load Ads, Videos, Images, Widgets, Javascript, CSS, Inline-Javascript, Inline-CSS & Any HTML.

License

Notifications You must be signed in to change notification settings

cheonmux/LazyHTML

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazyHTML: Lazy load Ads, Widgets, Images & Any HTML elements.

LazyHTML is an OpenSource Javascript Library that Supports Lazy Loading any elements without Modifying Code, LazyHTML can lazy load Ads, Videos, Images, Widgets, Javascript, CSS, Inline-Javascript, Inline-CSS & Any HTML. LazyHTML was initially developed with the intention to Lazy Load Ads

Features & Pros

  • Cross browser compatible.

  • Support Asynchronous loading.

  • LazyHTML can load Both Asynchronous & Synchronous Ads, Widgets, Javascript codes Asynchronously.

  • No HTML, Javascript or CSS Code modification required when Lazy Loading elements.

  • LazyHTML Supports lazy loading Ads without Modifying Adcodes.

  • Uses Intersection Observer with fall back to eager loading on its absence.

  • Supports eager loading.

  • Supports media queries.

  • Supports container dimension conditions.

    Cons

  • HTML, CSS or Javascript comments are not allowed inside the wrapper.

How it Works

Load the script.

 <script async src="https://cdn.jsdelivr.net/npm/lazyhtml@1.2.3/dist/lazyhtml.min.js" crossorigin="anonymous" debug></script>

Wrap the elements those you want to Lazy Load.

<div class="lazyhtml" data-lazyhtml>
  <script type="text/lazyhtml">
  <!--
  
Your HTML, CSS or Adcodes here. (including wrapping <script>,<style> tags)
  
  -->
  </script>
</div>

Installation

Install via npm:

npm install --save lazyhtml

Support

About

LazyHTML is an OpenSource Javascript Library that Supports Lazy Loading of any elements without Modifying Code, LazyHTML can lazy load Ads, Videos, Images, Widgets, Javascript, CSS, Inline-Javascript, Inline-CSS & Any HTML.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%