If your store uses images or other files stored in the "Files" library, there is an easy trick to improve the response time of those files - and make your pages load faster.
Typically you reference files from the library using this relative URL:
/lib/yourstoreid/filename
where you replace yourstoreid with the Yahoo account ID of your store. This is generally fine, because the Store is smart enough to expand this to the actual location of the file, which is at
http://lib.store.yahoo.net/lib/yourstoreid/filename
What I often see in stores is that the store operator enters things like this:
http://www.yourdomainname.com/lib/yourstoreid/filename
or
http://lib.store.yahoo.com/lib/yourstoreid/filename
What's wrong with that? Well, Yahoo! Store is still smart enough to find the correct file for you, but it doesn't come cheap. What happens is that the Yahoo! Store server does a redirect on these URLs so that they reference the file correctly from the lib.store.yahoo.net server. In a test I've done, these redirects generally took a little over 1,000 milliseconds - or one second. Now imagine if you had 10 or 20 such references in a page? Or inside a css file. It would slow your pages down and completely unnecessarily.
This can be even more pronounced on your checkout pages, where everything is served over an already slower SSL connection (yes, SSL is always slower than regular, unsecure HTTP://), and if you have relative URLs such as /lib/yourstoreid/... in your checkout pages, those will always be redirected. The fix is to use the absolute URL https://lib.store.yahoo.net/lib/yourstoreid/... in your checkout pages, and http://lib.store.yahoo.net/lib/yourstoreid/... on the regular store editor pages. Be sure to do this not only in your HTML source but in all JavaScript and CSS files you use as well.
Typically you reference files from the library using this relative URL:
/lib/yourstoreid/filename
where you replace yourstoreid with the Yahoo account ID of your store. This is generally fine, because the Store is smart enough to expand this to the actual location of the file, which is at
http://lib.store.yahoo.net/lib/yourstoreid/filename
What I often see in stores is that the store operator enters things like this:
http://www.yourdomainname.com/lib/yourstoreid/filename
or
http://lib.store.yahoo.com/lib/yourstoreid/filename
What's wrong with that? Well, Yahoo! Store is still smart enough to find the correct file for you, but it doesn't come cheap. What happens is that the Yahoo! Store server does a redirect on these URLs so that they reference the file correctly from the lib.store.yahoo.net server. In a test I've done, these redirects generally took a little over 1,000 milliseconds - or one second. Now imagine if you had 10 or 20 such references in a page? Or inside a css file. It would slow your pages down and completely unnecessarily.
This can be even more pronounced on your checkout pages, where everything is served over an already slower SSL connection (yes, SSL is always slower than regular, unsecure HTTP://), and if you have relative URLs such as /lib/yourstoreid/... in your checkout pages, those will always be redirected. The fix is to use the absolute URL https://lib.store.yahoo.net/lib/yourstoreid/... in your checkout pages, and http://lib.store.yahoo.net/lib/yourstoreid/... on the regular store editor pages. Be sure to do this not only in your HTML source but in all JavaScript and CSS files you use as well.
Comments