I created a static resource and set the Cache Control to Public. However, when I access the static resource URL directly, I get the Salesforce login page. Here's the URL I'm using:


The resource is an image file. It is not contained within a Zip file.

Are there other settings I need to update in order for the static resource to be accessible?

  • 1
    Please don't add the "answer" as an edit of the "question". There's an answer spot down below. You are free to self-answer your own questions if you discover a solution.
    – sfdcfox
    Commented Mar 4, 2022 at 15:31
  • @sfdcfox I thought I needed to wait 48 hours to do that. The waiting period is no longer a requirement for StackExchange? Commented Mar 4, 2022 at 15:50
  • You can answer immediately, but you cannot "accept" your own answer for 48 hours. It's always been this way, as far as I recall.
    – sfdcfox
    Commented Mar 4, 2022 at 15:55

1 Answer 1


When I enabled this Session Setting, the problem was resolved:

Enable Content Sniffing protection

  • 2
    I have tried this and it is not working. Commented Apr 21, 2023 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .