3

I had completed my magento website called www.bookslab.in. I want to increase the speed of my website. I had checked my website speed on "tools.pingdom.com" it is coming "4.34s" page load time & Performance grade as: 91. My website speed will increase if i remove this 1 error 1) Serve static content from a cookieless domain I am attaching the screenshot of my website speed details.

enter image description here

enter image description here

  • did you see the uploaded screenshot @ProxiBlue – Salman Dalal May 26 '17 at 10:22
2

Option 1:

Use a cdn to serve static content (js, css and images)

Option 2:

Setup additional CNAME DNS entries:

js.bookslab.in css.bookslab.in images.bookslab.in

or setup a wildcard DNS entry *.bookslab.in

Configure site urls accordingly in admin and set js, css and media urls accordingly ( so dont use {base_url} in the url setups )

system->configuration->web->secure/unsecure urls

enter image description here

so for example you will have https://js.bookslab.in/js in the js configuration.

For both options 1 and 2:

Now configure your store cookie domain as www.bookslab.in ( important: you will invalidate all current sessions. All active logged in customers will be logged out and active carts will be dropped )

Clear cache

Explanation: Cookies will now only be served fir content served from www.bookslab.in

The js, css and images urls ( or cdn served content ) will not have cookies as they are not valid for the confugured cookie domain.

Bonus: On option 2 you have now also done domain sharding. This will also then allow content to be served parrallel.

Hope that helps

  • I only understand the CNAME DNS entries part. can you explain me how to configure this all thing. – Salman Dalal Feb 12 '17 at 17:23
  • Hi. Sure. On my mobile ( at time of answer and now ) will expand when at office in a couple of hours. Go ahead and configure cnames so dns can start propagation – ProxiBlue Feb 12 '17 at 21:20
  • @SalmanDalal updated with example – ProxiBlue Feb 12 '17 at 22:03
  • Do i have to replace the above urls with the urls have stated above as js.bookslab.in & more – Salman Dalal Feb 14 '17 at 1:41
  • so for example you will have https://js.bookslab.in/js in the js configuration. – ProxiBlue Feb 14 '17 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.