Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Constants.php cookies ips4_

Featured Replies

Posted
Hello

Does it make sense to create a subdomain like “static.mydomain.com” in order to define the domain of cookies?

Should I then add in the constants.php file the following 3 constants, namely:

- \define ('COOKIE_DOMAIN', 'https://static.mydomain.com');
- \define ('COOKIE_PREFIX', 'prefix_');
- \define ('COOKIE_PATH', '/');

I'm not sure if these are the correct lines to insert into the constants file!

Thank you in advance,
Regards,

Claude

Edited by Claude

short answer: No

What problem are  you having that you are trying to solve? 

 

 

  • Author
 

short answer: No

What problem are  you having that you are trying to solve? 

 

Hello Rhett,

I would like to avoid unnecessary cookie traffic and serve static content from a different domain.

Thanks Rhett

Claude

 

Hello Rhett,

I would like to avoid unnecessary cookie traffic and serve static content from a different domain.

Thanks Rhett

Claude

Can you again please clarify what problem you are trying to solve with this?  Are you simply trying to trick/mask speed test sites to obtain a better results or are you actually having an issue that you are trying to correct?  

 

 

  • Author
I'm just trying to fix the errors encountered on GTmetrix regarding the speed test to get better results.

Thanks Rhett

 
I'm just trying to fix the errors encountered on GTmetrix regarding the speed test to get better results.

Thanks Rhett

You would not be fixing anything in that case, just tricking the test site to think it's better, it would have no real world impact.  I wouldn't waste your time with this honestly,  all this does is trick the test site into producing a better score, it has no impact on real world performance. (actual usage) If this actually made a difference in performance it would be included in the core with settings and options for this.

 

 

  • Author

Ok Rhett. It's just.

Claude

You're approaching this backwards. Firstly, this is invalid:

 \define ('COOKIE_DOMAIN', 'https://static.mydomain.com');

You enter a domain, not a fully qualified URL. So something like "static.mydomain.com". BUT, that would break your site entirely - it would tell browsers to only set and read the cookie from the domain you entered (which wouldn't work because the primary domain would be trying to set and read the cookies).

What the test suite you are using is recommending is to store your images and other static assets somewhere like "static.separatedomain.com" and serve the files from there, without changing how cookies work on your main domain. You can already do this by using the built in S3 integration in the AdminCP under System > Files > Storage Settings.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.