Contents
How to use cookie-free domains in WordPress
- Create a subdomain, such as static.yourwebsite.com , which is where you will deliver all your static files from.
- Point your new subdomain to the /wp-content directory of your WordPress installation.
Use a CDN provider to ignore cookies Using a CDN provider is another good way to solve the cookie-free domain problem. Most of the CDN has the ability to ignore cookies and strip cookies which helps to completely prevent the browsers from receiving the Cookie response header.
Why do I have two cookies in Magento?
When your Magento system has the same configuration for your main domain and subdomain in the Magento config, and if the user logs in to both the sites, Magento creates two cookies. One has ‘Domain Value’ set with the main domain, and another with the subdomain.
When the user logs out, Magento will regenerate the cookie with a Domain Value from the URL accessed (i.e www.example.com ), since in php.ini no cookie domain was specified. Note that if the user logs in using example.com or a cookie domain is configured in php.ini, no issues will arise.
Where is the PHP Session ID stored in Magento?
As you might have guessed, the same PHP Session ID needs to be stored as a cookie in the client browser to relate. Magento can store sessions via multiple session providers and this can be configured in the Magento config file at app/etc/local.xml.
Why do I get nonce ID when I log in to Magento?
This is how it typically happens: when you login by entering your username and password, you will be redirected to the same login page and URL, and your browser is appended with nonce id. This happens for both the customer front-end and the Magento back-end login. Let’s look at a few reasons why this happens, and how we should resolve those issues.