Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
NGINX return 410 for deleted CSS and JS files

I have a problem with a plugin I've deleted, apparently the cache on the users browser still send request for some JS and CSS files that are gone, the problem is that this is causing a lot of 404 errors in the logs (in 1 day I generated 4GB of error logs only containing the 404 deleted CSS and JS files).

I was trying to create a setting on NGINX that will send a 410 response to everyone that was trying to access the missing JS and CSS files, the path of the files is the same:

/wp-content/cache/autoptimize/js/autoptimize_single_32ab5663ad75c559c9af68098a1b63e6.js

/wp-content/cache/autoptimize/css/autoptimize_32c1c99d8f7a5a9618074737134c8f9c.css

I tried various location settings I found online for both all files that contains autoptimize_*.css and js and the folder /autoptimize, but it didn't work, it was like this:

location ^~ /autoptimize { return 410; }

What I'm missing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try :

location ^~ /wp-content/cache/autoptimize/ { return 410; }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!