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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:38:30+00:00 2026-05-26T13:38:30+00:00

I have a homepage that contains a huge amount of php code to populate

  • 0

I have a homepage that contains a huge amount of php code to populate the divs (including newsletter sign up with validation, content from a mysql database and various static images). The whole page is built on top of a background cross fade javascript.

It all works great and looks good…..however – when loading the page, the last “div” to appear is the background image – creating effectively a large “white space” until all the divs have loaded up and the background image is rendered.

Is there a method to load the first background image before anything else so that the user is not left with this blank space when navigating to the site?

I have seen in using rollover images, the rollover version can be preloaded in the script – would this be the best method to adopt when seeking such a solution?

Any help or advice much appreciated – happy to display code if required – just didnt think it would be too helpful given the amount there is in my script!!

Thanks
JD

  • 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-26T13:38:31+00:00Added an answer on May 26, 2026 at 1:38 pm

    I think your problem is the order in which the images are loaded.

    If your background image is loaded after all the other elements, make sure that your background image is loaded as soon as possible. If your background image is a div with the CSS property background-image:url(myimage.png), include the CSS file in the head tag.

    Also, you can save your background image as a png interlaced. (In photoshop: save for web and devices > png24 > tick interlaced). This way, the image will quickly apear with a poor quality, and will improve as the data is transfered to your browser.

    If you want to control the image loading with jQuery, look at this question: Preloading images with jQuery. But I doubt this will be usefull for you, as your problem is the order in which elements are loaded.

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

Sidebar

Related Questions

I have a site which has a homepage that contains a great deal of
I have a website that has an include folder which contains php templates and
I have built a GPS tracker that updates a homepage with its positions (and
I have a little app that have by default youtube as homepage. You can
Assuming that we have: http.HandleFunc(/smth, smthPage) http.HandleFunc(/, homePage) User sees a plain 404 page
SCENARIO: I have a Pictures table that contains hundreds of photos. I'm currently using
I have a database table that contains blog posts. I want to show on
I have an Image control that contains a path to an embedded image (build
I have made a custom block in Magento that contains some JS. I want
I have a window which contains a Frame which references a 'home' page that

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.