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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:08:55+00:00 2026-05-28T13:08:55+00:00

I am using a jQuery preloader for my images and I was wondering if

  • 0

I am using a jQuery preloader for my images and I was wondering if it is possible to check if a page is already cached in a users browser before running the loader, is this possible?

The plugin runs on dom load with a function

$(document).ready(function () {
    $("body").queryLoader2();
});

Could I write something like:

$(document).ready(function () {
    if (!page_cached) {
        $("body").queryLoader2();
    }
    else {
        //do nothing
        return false;
    }
});

Appreciate your responses, thanks.

  • 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-28T13:08:55+00:00Added an answer on May 28, 2026 at 1:08 pm

    You could do a head request via ajax and if it returns 304 instead of 200, it would mean its there in the cache. Something in javascript would be like:

    
    function isInCache(url)
    {
      var http = new XMLHttpRequest();
      http.open('HEAD', url, false);
      http.send();
      return http.status;
    }
    //then
    $(document).ready(function () {
        if (isInCache(your_page_url) != "304") {
            $("body").queryLoader2();
        }
        else {
            //do nothing
            return false;
        }
    });
    
    

    Hope it helps

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

Sidebar

Related Questions

I am using jQuery to build an array of images from a php array.
I'm making a site in which I'm using jQuery to change background images on
I'm not referring to preloading images, I want to preload an HTML page using
I am using jquery ajax to load a separate page into a modal window
I'm using a function below to preload images on my ajax page. My page
I'm currently using a small jquery script to rotate through background images on a
Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this
Using Jquery TableSorter, I am creating a custom parser to sort elapsed time <td>
using jquery's .post i send do my php code an object that with var_dump
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if

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.