Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6790769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:45:54+00:00 2026-05-26T17:45:54+00:00

Consider a HTML page with a bunch of tags each with their own content.

  • 0

Consider a HTML page with a bunch of tags each with their own content. I want to transform each tag to a slide in a slideshow powered by JavaScript. Each tag can contain images and they should be lazy loaded in this slideshow. I don’t want all images to load at once.

On the other hand, users with no JavaScript enabled and search engines should just the see markup and all the images. How do I avoid images from loading when JavaScript is enabled, and how do I make sure images are loaded when no JavaScript is enabled?

One way would be to replace all images with this format:

<img src="" data-src="myimage.png">

The problem with that solution is there’s no graceful degradation.

Instead, I have to do:

<img src="myimage.png">

The problem with that is that you can’t prevent the browser from loading all of the images in the HTML page. I’ve tried to modify the HTML in several ways when the document is ready. For example, replace all src attributes in images with data-src, empty the entire body and so on.

Do I really have to sacrifice graceful degradation?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:45:54+00:00Added an answer on May 26, 2026 at 5:45 pm

    The simplest method might be to duplicate the image tags enclosed in a <noscript> tag and using their src attribute. Above or below that, you could have the same tags with the custom data-src attribute, detect and lazy-load them with Javascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hava a HTML page on server. consider an article example is loaded in
Consider this page @ http://www.bloodbone.ws/screwed.html I need to be able to have the a.grow
Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href=screen.css rel=stylesheet />
Question: I'm having a little trouble with jQuery: Consider this HTML, where I want
Consider the following html code: <div id='x'><div id='y'>Y content</div>X content</div> I'd like to extract
I'm designing an HTML page for display in Android browsers. Consider this simple example
Consider the following simple html page markup: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
Consider a static HTML page as test.html , and a printable version of the
Consider the following HTML structure: <div class=content> <div class=field field-type-date field-field-event-date> <div class=field-items> <div
In my django app's index.html (which I consider as the home page of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.