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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:23:55+00:00 2026-05-13T14:23:55+00:00

i just read this article : https://developer.mozilla.org/en/HTTP_Caching_FAQ There’s a firefox behavior (and some other

  • 0

i just read this article : https://developer.mozilla.org/en/HTTP_Caching_FAQ

There’s a firefox behavior (and some other browsers i guess) i’d like to understand :

if i take any webpage and try to insert the same image multiple times in javascript, the image is only downloaded ONCE even if i specifiy all needed headers to say “do no ever use cache”. (see article)

I know there are workarounds (like addind query strings to end of urls etc) but why do firefox act like that, if i say that an image do not have to be cached, why is the image still taken from cache when i try to re-insert it ?

Plus, what cache is used for this ? (I guess it’s the memory cache)

Is this behavior the same for dynamic inclusion for example ?
ANSWSER IS NO 🙂 I just tested it and the same headers for a js script will make firefox redownload it each time you append the script to the DOM.

PS: I know you’re wondering WHY i need to do that (appending same image multiple times and force to redownload but this is the way our app works)

thank you


The good answer is : firefox will store images for the current page load in the memory cache even if you specify he doesnt have to cache them.

You can’t change this behavior but this is odd because it’s not the same for javascript files for example

Could someone explain or link to a document describing how firefox cache WORKS?

  • 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-13T14:23:56+00:00Added an answer on May 13, 2026 at 2:23 pm

    What you are dealing here is only partly a matter of caching.

    The whole idea of embedding images by references them by URLs, is that you can reference to the same URL multiple times, and have the browser load it only once.

    So basically if you write HTML (let’s say index.html):

    <img src="hello.jpg" />
    <img src="hello.jpg" />
    

    In this case, browser only invokes 2 HTTP requests: one for index.html and second one for hello.jpg.

    What you need to do here is to “fake” that the images are loaded from different URLs. For this there are multiple methods.

    Potentially the easiest solution is to add an extra prefix to the end of the URL. For instance if you want to load an image twice, you could add:

    <img src="hello.jpg?1" />
    <img src="hello.jpg?2" />
    

    This will cause the browser the send one HTTP request to retrieve each of the images: one for hello.jpg?1 and second for hello.jpg?2. Some web servers / browsers, however, may still optimise this and send only one request to simply retrieve hello.jpg.

    If this doesn’t work, you can also try passing your image through a script like PHP, as suggested in another answer.

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

Sidebar

Ask A Question

Stats

  • Questions 427k
  • Answers 427k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What about : a LinearLayout, with vertical orientation, that would… May 15, 2026 at 12:52 pm
  • Editorial Team
    Editorial Team added an answer That depends if Bank is an instance of Remote or… May 15, 2026 at 12:52 pm
  • Editorial Team
    Editorial Team added an answer In C, you cannot return a string from a function.… May 15, 2026 at 12:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.