0

Working on magento 1.9 store after getting a improvement suggestion from gtmetrix to serve content from cookieless domain.

( suppose domain is www.example.com )

i created a subdomain cdn.example.com and directed to www.example.com and on magento Unsecure Url's did following

Base Link URL http://www.example.com/

Base Skin URL http://cdn.example.com/skin/

Base Media URL http://cdn.example.com/media/

Base JavaScript URL http://cdn.example.com/js/

Secure Url's

Base Link URL https://www.example.com/

Base Skin URL https://cdn.example.com/skin/

Base Media URL https://cdn.example.com/media/

Base JavaScript URL https://cdn.example.com/js/

on website product images and logo are showing properly but some other images such as cart logo, social sharing logo's are not showing properly here with i attach the images after and before change of url.

before changing url : enter image description here after changing url : enter image description here

how can this be resolved ?

  • Have you changed this configurations from admin: Base Skin URL - {{secure_base_url}}skin/ Base Media URL - {{secure_base_url}}media/ Base Javascript URL - {{secure_base_url}}js/ – kunj May 15 '18 at 17:32
  • yes, i changed the same – RANU EMPRISE May 15 '18 at 17:40
  • Have you checked same for store view AND website? Can you share URL? – kunj May 15 '18 at 17:49
  • yes, website is www.i-ranu.com – RANU EMPRISE May 15 '18 at 17:51
  • I have tried it with adding cdn., and it is woking for me – kunj May 15 '18 at 17:59
0

You need to enable Access-Control-Allow-Origin for your CDN URL. Your Font files are not loading that's why social logos not displaying.

Here is the Error:

Access to Font at 'http://cdn.i-ranu.com/skin/frontend/smartwave/porto/icons/font/porto.woff2?20988115' from origin 'http://www.i-ranu.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.i-ranu.com' is therefore not allowed access.
  • Welcome, happy to help you!!! – kunj May 15 '18 at 18:24

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.