Unable to activate Cache-Control

Hi,

I have hosted a solution on freecluster.eu with SSL certificate. My application is not able to render the files due to disabled cache-control. I have placed a .htaccess file with cache control enabled inside the folder but its not working. Need some help.

Thanks.

Cache is enabled by default on free hosting

That’s what I thought too. If you check this link for header’s, you’ll see that cache is disabled.

https://mavericktesthosting.freecluster.eu/PhishReporter/Images/Icon64MainURL.png

Check it online on

See the Output response

https://mavericktesthosting.freecluster.eu/PhishReporter/Images/Icon64MainURL.png


200 OK

Status: 200 OK
Code: 200
Server: nginx
Date: Mon, 04 Oct 2021 05:47:29 GMT
Content-Type: text/html
Content-Length: 884
Connection: close
Vary: Accept-Encoding
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Cache-Control: no-cache

Looks ok to me

image

2 Likes

I am not seeing a cache-control in server response.

HTTP/2 200
server: nginx
date: Mon, 04 Oct 2021 07:52:43 GMT
content-type: text/html
content-length: 846
vary: Accept-Encoding
expires: Thu, 01 Jan 1970 00:00:01 GMT
cache-control: no-cache

Something wrong with your system/browser?
Ok on my end

image

2 Likes

Cache-Control is Server response and not the browser.

Whatever your scanner is getting, it’s not your image. It’s getting HTML content, not image content.

Most likely it receives the challenge code described here:

If you want to check the cache headers that your browser receives, you can view the through the Developer Tools menu in the Network tab.

1 Like

Thank you for engaging and providing insight. It has been really helpful, specially the last shared security article.

I am trying to do 2 things in my local web app.

  1. Access an image, saved on server, via https URL to show in a drop down menu.

  2. Upon clicking a button, run a html and java script file, both stored on Server.

Should this work under this framework?

By “local web app”, I assume you mean some application running on your own system?

Because if so, that probably won’t work here. Websites hosted with us can only be accessed when opened in a browser directly. Embedding resources hosted here into sites hosted elsewhere isn’t possible.

I have developed an Outlook Add-in, which is actually a Web App hosted on Outlook client. In the manifest file (which describes the Addin behavior and from where to load the actual files), there is a link to an online image and a couple of html and JavaScript files on this Web Server.

There are 2 versions of Outlook, one is desktop based and other is Web Based (OWA), which runs in a browser (I am using Chrome). Both versions fail to load the image file from the URL however the desktop version successfully runs the HTML and JavaScript. The browser fails to load anything at all from this webserver.

I do not understand that why this functionality is not working in Web browser, which has a higher probability of running this code as compared to the Desktop version.

Usman

And that’s the issue. Did you even read the article that Admin posted? Its below.

1 Like

I posted my reply after reading it. You probably did not read that it is working fine on a Desktop app.

To be honest, I’m surprised the desktop app works. Because it shouldn’t, thanks to the security system @Greenreader9 and I have repeatedly been pointing to.

We provide web hosting for websites. Hosting assets for desktop apps is not a use case we support or (officially) allow.

In any case, you can’t fix this and we won’t fix this.

That’s fine. I won’t be hosting the app here and shall take it off. Can you recommend any free app hosting service which supports SSL.

Thank you,

If you only need to host HTML and Javascript, full static site hosting like GitHub Pages could do the trick as well.

1 Like

Its working as expected. Thank you for pointing me in the right direction.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.