---
title: "Discussion on \"Lazy Loading Your HTML pages using JavaScript\" | Hashnode"
description: "Discussion on \"Lazy Loading Your HTML pages using JavaScript\". lazy loading HTML content using javascript fetch API. You can also sanitize your pages using DOMPurifier"
url: "https://hashnode.com/posts/lazy-loading-your-html-pages-using-javascript/609b6aaa00bbde79d86a581e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Lazy Loading Your HTML pages using JavaScript](https://nightwing1998.hashnode.dev/lazy-loading-your-html-pages-using-javascript?utm_source=hashnode&utm_medium=feed)

lazy loading HTML content using javascript fetch API. You can also sanitize your pages using DOMPurifier

May 12, 2021 · 5 min read · nightwing1998.hashnode.dev  
Updated Mar 24, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#html5](https://hashnode.com/tag/html5)
-   [#dom](https://hashnode.com/tag/dom)

## Written by

[Dhruvil Shah](https://hashnode.com/@nightwing1998)

@nightwing1998

  
[View profile](https://hashnode.com/@nightwing1998)

mind is not a problem, mindset is

## Responses 1

Markdown supported · ⌘↵ to post

[Priyanka Veerakumar](https://hashnode.com/@priyankaveerakumar)

[May 13, 2021](https://hashnode.com/posts/lazy-loading-your-html-pages-using-javascript/609b6aaa00bbde79d86a581e/comment/609d529547373d4cb05615ab)

Kindly share lazy loading github repo

[Dhruvil Shah](https://hashnode.com/@nightwing1998)

[May 15, 2021](https://hashnode.com/posts/lazy-loading-your-html-pages-using-javascript/609b6aaa00bbde79d86a581e/comment/609d529547373d4cb05615ab#reply-609f6b95b684eb4cd52c7f1b)

The code is very small to make a GitHub repository for it. I have created a GitHub gist which you can find at [this](https://gist.github.com/NightWing1998/19097e8f09f2398f05e5cc4231f76429)
