question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minification not working for pages with response code !=200

See original GitHub issue

Hello, when i am using minification on 404 or other custom error pages, its totally ignored if i set HttpContext.Response.StatusCode=404; you can check the live url here ultrawebz

[CompressContent]
    [MinifyHtml]
    [MinifyXml]
public ActionResult HttpError404(string message="")
        {
            //HttpContext.Response.StatusCode=404; minification works only after this commented
            ViewBag.msg = message;
            return View();          
        }

but commenting this code is bad practice for seo. i am using webmarkupmin ver 2.5.7 (core) WebMarkupMin.AspNet4.Mvc 2.5.0

regards

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
CumpsDcommented, May 18, 2021

It works beautifully! 👍🏻 💯

0reactions
Taritsyncommented, May 18, 2021

Great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Minified React error #200 - javascript
This is my code using components in React. I am trying to simulate a google Search Image result with Image,caption and Link, but...
Read more >
200 instead of 404 inside the /minify folder
The Minify folder is expected to have changing files so checking an non existing file and returning 200 is somewhat of a normal...
Read more >
Application Insights JavaScript SDK troubleshooting
This article discusses how to troubleshoot various issues that ... To do this, check for response code 200 (success) or 304 (not changed)....
Read more >
What is Minification and why is it Wreaking Havoc
One popular practice is to minify that code. Minifying your code is usually safe, but if you're not careful it can cause problems....
Read more >
How to Configure W3 Total Cache Settings
If you notice unusual issues on your site after minifying assets, ... With that option selected, 404 pages return a 200 response code....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found