0

I want to force all pages on my WordPress setup to not set any cookies, except for the file and folder: wp-login.php and /wp-admin

# disable cookies globally
fastcgi_hide_header Set-Cookie;

if ($request_uri ~* "(/wp-admin/|/wp-login.php)") {
    # how can I allow the Set-Cookie header here?
}

I would setup a cookieless subdomain but WordPress doesn't allow you to easily do that (hardcoded paths). I'm using NGINX 1.4.6 with FastCGI caching and php5-fpm

braindamage
  • 101
  • 1
  • You can't do that with cookies. Use `www` for your blog and put static resources under another hostname, e.g. with W3 Total Cache. – Michael Hampton Oct 29 '14 at 20:35
  • I'm using a CDN. This is for the pages because I don't want to use a plugin for that when fastcgi cache works just fine for all my clients. Unfortunately I got this legacy WP setup. I also know about the $no_cache tricks but I want to know if what I'm asking is possible. – braindamage Oct 29 '14 at 20:38

1 Answers1

0

If you won't want to use a CDN and you don't want the cookies issue, You can use Quick Cache which works on Shared Hosting and use Autoptimize for Minifying CSS + JS.

I am also using NGINX but I'm running 1.7.7 but if your nginx.conf has the correct settings to gzip, and your virtual hosts file has the correct browser cache settings, you shouldn't have any issues. You can see my setup in testing, http://mywpdev.com