Knowledgebase: Hosting
Bypass the Nginx Cache to See Live Edits of Your HTML Site
Posted by H9 Admin on 31 March 2015 12:38 PM

What is Nginx?

Nginx is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3 and IMAP protocols, as well as a load balancer, HTTP cache and a web server. We run Nginx as a server-side caching engine, in front of Apache on our systems on port 80, on (almost every single one) of our Shared servers and a slew of VPSes. It answers any requests for static content that has been cached, like .html files recently viewed.

Bypass the Nginx Cache

If you have an HTML page or website that you're making edits to, but you're having trouble seeing the edits live as you make them... you might have an Nginx caching issue. Nginx caches your site content, but after you've made changes to your site, it doesn't realize you updated your files.

You can get around this by telling Nginx to forward the request straight to Apache, which runs on port 8080 instead of the default 80. To do this:

Note: this will only work on .html files—not WordPress!

  1. In your browser's toolbar, add '?nocache=1' to the end of your site page's URL

    Example http://example.com/?nocache=1

  2. If '?nocache=1' isn't possible given your URL's structure you can force it to hit port 8080 by typing ':8080' after your site page's URL

    Example http://example.com:8080

(1 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion