justinwpw Posted March 26, 2011 Share Posted March 26, 2011 I'm using Prestashop 1.4.0.17.I have selected the CCC performance parameters, but I can’t find the cached content. In what directory is it stored?I assume I need to copy this cached content to my other servers to use cookieless static content. Is that correct?Does anyone have any advice on how to set up Amazon Cloudfront edge servers as the media servers? Link to comment Share on other sites More sharing options...
rocky Posted March 28, 2011 Share Posted March 28, 2011 The combined JS and CSS files are in themes/yourtheme/cache. I'm not sure whether you need to manually copy them. You can set up a redirect between domains. On my site, I created a static subdomain and set it up to automatically redirect to the www subdomain. It seems to be working. Link to comment Share on other sites More sharing options...
Mister Denial Posted June 7, 2011 Share Posted June 7, 2011 Hi Rocky, can you elaborate a bit on how to make this media server thing work? Thank you in advance!Best regards,Daniel Link to comment Share on other sites More sharing options...
rocky Posted June 8, 2011 Share Posted June 8, 2011 I'm not 100% sure on how this feature works, but I think I've got it working on my website. It seems to make the website faster, but I have no proof that it actually does. I went to my cPanel, chose the "Subdomains" option, then added a new subdomain "static" that redirects to "www". After doing this, I went to the Preferences > Performance tab and entered static.nethercottconstructions.com as a media server. Now, when I go to my website, all my CSS, JavaScript and images are read from static.nethercottconstructions.com and the other files are read from www.nethercottconstructions.com. There is no need to manually copy files from www to static, the redirection should handle that automatically. Theoretically, doing this should prevent cookies being passed whenever CSS, JavaScript and images are requested, since cookies only apply to the www subdomain. This should save bandwidth and speed up your website. Link to comment Share on other sites More sharing options...
Mister Denial Posted June 8, 2011 Share Posted June 8, 2011 Hi Rocky, thanks for your input. Did I understand correctly, you only set up the static domain, without copying any files to that domain, right?Also, are you on a dedicated server, VPS or shared, if I may ask?Thanks in advance!Dan Link to comment Share on other sites More sharing options...
rocky Posted June 8, 2011 Share Posted June 8, 2011 That's right. You don't copy any files, just set up redirection to www.I see "Dedicated IP" as an upgrade option on my account, so I guess I'm used a shared server. Link to comment Share on other sites More sharing options...
devilsown Posted June 9, 2011 Share Posted June 9, 2011 If your paying less than 150 a month you are more than likely on a vps or shared account. usually with dedicated boxes you get to pick what processor, hd, memory etc. great idea on getting the media servers to work. It should allow the browser to get more connections to the server. Link to comment Share on other sites More sharing options...
Mister Denial Posted June 9, 2011 Share Posted June 9, 2011 Ok, my theme is not CCC compatible, so no media server for me right now. Link to comment Share on other sites More sharing options...
armadillo Posted June 17, 2011 Share Posted June 17, 2011 Hi, how i can redirect the subdomain to WWW Link to comment Share on other sites More sharing options...
armadillo Posted June 17, 2011 Share Posted June 17, 2011 Then do we have to unable Use CCC for CSS. and Use CCC for JavaScript. Link to comment Share on other sites More sharing options...
rocky Posted June 18, 2011 Share Posted June 18, 2011 Go to the Subdomains section of your cPanel, create a new subdomain called "static" , then click "Manage redirection" to redirect it to "www". Link to comment Share on other sites More sharing options...
armadillo Posted June 18, 2011 Share Posted June 18, 2011 Sorry i dont use Cpanel, i use grid shared server from mediatemple, i redirect with .htaccess. Is true this method?. And after redirection do i have do enable CCC for CSS. and Use CCC for JavaScript? I tryed with enable them but after active CCC for CSS. and Use CCC for JavaScript there happened CSS erro on product page. Link to comment Share on other sites More sharing options...
diana13 Posted June 21, 2011 Share Posted June 21, 2011 1. How can I make this redirection to test it on localhost?I've redirected static.mydomain.tld to http://localhost, but it didn't work, all images are replaced with question marks.2. CSS and js aren't static content? These files shouldn't be also on static.mydomain.tld?3. I activated all ccc option from performance (in 1.4.3), but I receive some errors, although in 1.4.2.5 worked ok. Link to comment Share on other sites More sharing options...
rocky Posted June 21, 2011 Share Posted June 21, 2011 1. I'm not sure whether it's possible to redirect using localhost. You may have to upload your website to a server before you can do.2. Yes, CSS and JavaScript are static content just like images. PrestaShop's media servers option includes all of these.3. I haven't had time to upgrade to PrestaShop v1.4.3 yet, so I can't help there. It's working fine on my v1.4.2.5 website. Link to comment Share on other sites More sharing options...
diana13 Posted June 21, 2011 Share Posted June 21, 2011 Thanks for your quick reply.Regarding 2: I've completed on media server static.mydomain.tld (just in the first field), but when I looked at my site source, it appears that only images are loaded from subdomain. CSS and js are loaded from localhost. What do I do wrong? I mean, even if it didn't work ok on localhost, at least I want to see that these files are loaded from subdomain. Next, I'll see what happens when I'll load the site on the server. Link to comment Share on other sites More sharing options...
armadillo Posted June 22, 2011 Share Posted June 22, 2011 Hi, when i activated SSL and use subdomain in Media Server, the images are not showing on https pages, i think i have to use SSL also for sabdomain, is it true, can anybody help about this? Link to comment Share on other sites More sharing options...
rocky Posted June 22, 2011 Share Posted June 22, 2011 From reading the changelog, it appears this is a bug that's been fixed in PrestaShop v1.4.3. Link to comment Share on other sites More sharing options...
armadillo Posted June 22, 2011 Share Posted June 22, 2011 i am using 1.4.3 version Link to comment Share on other sites More sharing options...
Mister Denial Posted July 1, 2011 Share Posted July 1, 2011 On the Yslow page at Yahoo, I read that for Media Servers to work ans serve static content, it must be a cookie-less domain, and that if the topdomain serves cookies, using a subdomen does not work. I have tried using an entirely different domain, but it does not work, images are not served at all.I am wondering if there are any files that need to be copied to the image domain or not? I tried copying the whole IMG folder there, but it did not work.Side-remark: I think it would be a smart move from the Prestashop Developers to create a quick guide to the Media Server feature that would help people use it, there are constantly new threads on the forum about this, and it might clarify this issue once and for all if we had an instructions guide. 1 Link to comment Share on other sites More sharing options...
lettersets Posted May 19, 2012 Share Posted May 19, 2012 I went to my cPanel, chose the "Subdomains" option, then added a new subdomain "static" that redirects to "www". After doing this, I went to the Preferences > Performance tab and entered static.nethercottconstructions.com as a media server. I followed the exact instructions, but my images aren't showing up when I add the static.mydomain.com as a Media Server. I have browsed the forums and forge and see that it might have to do with cookies on the main www domain. Did you do anything to surpass this? And any thoughts on how else to get this to work? Also, I followed the tips from this page: http://www.prestashop.com/blog/en/10-best-tips-to-speed-up-your-prestashop-store-3/#comment-1899 5. Create sub-domains for Javascript files and CSS files Create a sub-domain js1.mystore.com and ask your hosting provider to direct it to /js/ Create a sub-domain js2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/js/ Create a sub-domain css1.mystore.com and ask your hosting provider to direct it to /css/ Create a sub-domain css2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/css/ These 4 sub-domains will allow your visitors to load more files at the same time. Basically, a web-browser is limited to 8 parallel downloads. Each sub-domain is adding 8 new parallel downloads, so the total would be 40 (Main domain + 4 sub-domains). As it seems to be doing something similar. Would I add those subdomains to the Media Server bit or do I point towards them somewhere else? Link to comment Share on other sites More sharing options...
pel024 Posted May 28, 2012 Share Posted May 28, 2012 Hi, when i activated SSL and use subdomain in Media Server, the images are not showing on https pages, i think i have to use SSL also for sabdomain, is it true, can anybody help about this? I'm having this problem on v1.4.6. Using Rocky's method above works fine on regular pages (speed noticeably increased), but no css or images loaded when on https. Anyone know how to fix this? Perhaps by forcing the content to be called from it's original location when on https pages, rather than the media server/subdomain? Cheers. Link to comment Share on other sites More sharing options...
adamus007p Posted June 4, 2012 Share Posted June 4, 2012 (edited) 5. Create sub-domains for Javascript files and CSS files Create a sub-domain js1.mystore.com and ask your hosting provider to direct it to /js/ Create a sub-domain js2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/js/ Create a sub-domain css1.mystore.com and ask your hosting provider to direct it to /css/ Create a sub-domain css2.mystore.com and ask your hosting provider to direct it to /theme/mytheme/css/ These 4 sub-domains will allow your visitors to load more files at the same time. Basically, a web-browser is limited to 8 parallel downloads. Each sub-domain is adding 8 new parallel downloads, so the total would be 40 (Main domain + 4 sub-domains). but in Prestashop there are only 3 lines to write subdomains more questions, see my post http://www.prestashop.com/forums/topic/170993-ccc-server-how-to-use-configure-it/#entry844457 Edited June 4, 2012 by adamus007p (see edit history) Link to comment Share on other sites More sharing options...
ralphstirrat Posted July 24, 2012 Share Posted July 24, 2012 I created 3 subdomains and pointed them ALL to my root folder, I can then see that different images are served from different locations, I use webpagetest.org which shows it is working, try it before and after. My first byte score went from an "F" to a "D" rating. This seems to only serve images from different locations and my css/js files are no longer compressed but it's still an improvement. Link to comment Share on other sites More sharing options...
cutecat Posted August 24, 2013 Share Posted August 24, 2013 (edited) I created 3 subdomains and pointed them ALL to my root folder, I can then see that different images are served from different locations, I use webpagetest.org which shows it is working, try it before and after. My first byte score went from an "F" to a "D" rating. This seems to only serve images from different locations and my css/js files are no longer compressed but it's still an improvement. Hi Ralph I had also done the same way, but my website came out in a total mess. I have attached the picture. Edited August 24, 2013 by cutecat (see edit history) Link to comment Share on other sites More sharing options...
Cari Posted October 24, 2013 Share Posted October 24, 2013 (edited) Hi RalphI had also done the same way, but my website came out in a total mess. I have attached the picture. Untitled.png Hey Cutecat! Did you manage to do it in the end? I got the same outcome as you but when i did a wildcard redirect from the subdomain to the shop domain the layout returned to normal. You can see through the network tab in the browser that the servers are being used, but there doesn't seem to be any change in page load though. Edited October 24, 2013 by Cari (see edit history) Link to comment Share on other sites More sharing options...
buhajus Posted December 15, 2013 Share Posted December 15, 2013 Same problem almost for all There is no good guide how to configure Link to comment Share on other sites More sharing options...
trevorgilligan Posted February 13, 2015 Share Posted February 13, 2015 just wondering if using a cookie-free domain will have a bad effect on my website? do i have to set up a subdomain to use it? also is this the code? Header unset Cookie Header unset Set-Cookie <FilesMatch "!\.(gif|jpe?g|png)$"> php_value session.cookie_domain example.com </FilesMatch> Link to comment Share on other sites More sharing options...
doekia Posted February 13, 2015 Share Posted February 13, 2015 irrelevant, Prestashop uses no session at all. If you are on the same domain, user-agent will send the cookie to your media server regardless of the content serviced. Honestly unless you face 15millions hit per hour don't bother with the cookie-less domain thingy - it will only cost you another domain and deserve no purpose in daily scenario 1 Link to comment Share on other sites More sharing options...
trevorgilligan Posted March 24, 2015 Share Posted March 24, 2015 thanks doekia trev Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now