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 425781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:24:51+00:00 2026-05-12T19:24:51+00:00

I am aware of ways I can preload images (and css files) using hidden

  • 0

I am aware of ways I can preload images (and css files) using hidden embedded tags/includes, css styles and javascript but these all rely on the need to embed an extra tag or css rule to load each of these files and for each new image I must remember to add in another preload rule.

What I am looking for and can’t seem to find anywhere is a way to scan CSS files (using JS) to identify all url(…)’s within the css file so I can then preload these images. This would mean that if I go in and add another background-image to a style I know it will be found and preloaded without me doing anything

Essentially I would like to have two functions:

Preloader.loadCss(filePath, preloadImages);
Preloader.loadAllImagesInCssFiles();

The first function would preload a css file and then if required scan it for all images and preload them. The second function would scan all CSS files included within the page and load images used by these style sheets.

I’m hoping someone might have some ideas on how I might achieve this or know of an existing solution.

  • 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-12T19:24:51+00:00Added an answer on May 12, 2026 at 7:24 pm

    Yes, somebody has done this already with jQuery…

    jQuery Script to Automatically Preload images from CSS

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

Sidebar

Related Questions

Two questions: how can I write a shell variable from this script into its
I'm looking for suggestions for ways to share Android app data between phones running
It's been a while since I've done Java I/O, and I'm not aware of
I'm using python 2.7, and trying to run some CPU heavy tasks in their
What are the correct ways of initializing (allocating memory) and releasing (freeing) an AudioBufferList
I'm using priority_queue with a vector as an underlying container. However I expect the
Given the following template: template <typename T> class wrapper : public T {}; What
I want to use my iPhone to very easily create a timestamp whenever a
I'm debugging a reference leak in a GObject-based application. GObject has a simple built-in
Quite often when I design a website for a customer, I design his website

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.