Menu Close

How to clear HTTPS cache on Firefox

Have you ever tried opening a working HTTP website but Firefox keep redirecting it to HTTPS? This happened to me.

I was working on a website and testing a couple of web servers. I was testing Caddy 2 then Apache2 and switching back to Nginx and found out that the domain keep redirecting to HTTPS even when I typed wanted to open HTTP.

How it happen?

I found this blog explained the cause and different approach to solve. Basically in my case, Caddy or perhaps Apache2 injected Strict-Transport-Security into HTTP header value.

Strict-Transport-Security: max-age=31536000

This will force browser to cache HTTPS state for the domain until the time specified expired.

Solution

The solution is quite simple. I have tried many solution which didn’t work until I found this answer. You need to clear site preferences in Firefox settings.

You can either access the shortcut by hitting CTRL + SHIFT + DELETE

or

Go to Preferences > Privacy & Security > History, then click Clear History.

You will then see a popup like this

Clear HTTPS redirection cache

Make sure all are unchecked except Site Preferences. Set time range to Everything, then hit Clear Now.

You website should be loading on HTTP again.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x