A website downloads a .gz file instead of opening
Was wondering what happened. Hopefully its resolved soon. In my case, WPSuperCache. To solve your problem add two things to your NGINX configuration: I had pre-compressed files so had to make sure the server send the correct Content-Type what on an Apache web server would be the ForceType directive. What 'Content-Type' header to use when serving gzipped files? Florian Florian 34k 6 6 gold badges silver badges bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Who is building clouds for the independent developer? Exploding turkeys and how not to thaw your frozen bird: Top turkey questions Featured on Meta.
Now live: A fully responsive profile. Reducing the weight of our footer. Linked Related Hot Network Questions. Question feed. When its occurring im still able to login via admin.
Any idea on what could be casuing this? Viewing 15 replies - 1 through 15 of 25 total. Kind regards! Bogdan S. Thread Starter tworak tworak 3 years, 4 months ago. I cant see any. I can see some Files in the minify dir like 6bffe. Thanks in advance. We have the exact same issue: — Clear cache — Most pages work except for 1 page after that we stop testing so there might be more — It is a different page every time — Gzip is enabled i have checked on the server — Disabling — We use Plesk Since most pages are working OK, it seems to be something random.
Thanks, Bas. This reply was modified 3 years, 1 month ago by vpls. Reason: Adding Author's previous reply. Plugin Contributor Marko Vasiljevic vmarko 3 years, 1 month ago. Hello vpls , Can you please share w3tc part of the. Hi vmarko , Absolutely. We believe the Page Cache could be causing part of the problem.
If for whatever reason, you cannot add the download attribute in the case that you cannot directly edit the HTML of your web page , you can optionally compress the file using zip, and instruct the user to download the zip file. You can alternatively explain to the user that they should right click on the link and select download.
If you have no other alternatives to force the file to download, you can host it on a file hosting service such as Google Docs. The most common file types that are affected by this behavior are PDF files and images.
The code below will tell the browser to prompt the user to save the file. This link does not have the download attribute. This link has the download attribute.
0コメント