Jump to content

- - - - -

Increase Page Load Performance by Use of an Image Subdomain

5 replies to this topic

#1 Ernst Jakob

Ernst Jakob

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationSwitzerland

Posted 13 February 2015 - 12:33 AM

Loading Shop Images from a SubDomain makes a lot of sense, Pagetesters like

"http://tools.pingdom.com" will 'thank you' for this with a much better 'overall perfomance Result.'


If you use different 'SITE URL's', but only under the SAME MAIN 'Customer Server DIRECTORY', it makes even more sense to CALL the IMAGE URL from another Site-URL, as shown below. This way, you reduce the LOAD of the Shop Server URL even more, compared with just calling the IMAGES from the same basic URL, by USE of the "http //www .SHOP-Server. ccc/image/" Address.


Still, if you have only ONE SITE URL registered within the same (YOURSITE) Server-Directory, DO IT ANYWAY, it will increase Speed in any Case, compared to the DEFAULT OC-Way, i.E.:




("http //www .SHOP-Server. ccc/image/")


'grabbing' it's images from their really OWN 'Place' and trough their OWN 'Lines' and 'Channels', so, not requiring to 'share' the Tasks with the 'Shop' Software itself, building the Page...


Many Internal Server Program Files are routed and loaded 'INTERNALLY', just like when you search for an Image on your local harddisk. Some other 'Routines' have to be 'EXECUTED', as deFacto Runtime Program, then, usually, an EXTERNAL HREF Internet based Call may be requested, to make it work. This, in very short, and very lowdown, the difference between HREF Links and INTERNAL Paths...




This is a typical regular Image 'HREF' URL-CALL, by use of this Mod, calling a Site like:




Assortment of Files, related:



or, if you only have ONE SIte, registered on that specific Server and it's Main Site Directory:


as Alternative, next Best to a really 'separate' Way of doing it.  It's better than nothing, because it will DOUBLE the tasks of the Browsers, trying to built the Page out of the Content delievered...


Compared with, as it would look like, if used the regular 'www' way:




If I call a related Shop Page like:


then, this is a REGULAR 'internal Directory-Path' Image-CALL, by use of DEFAULT 'Link-Values':


And this is the 'internal Directory-Path' Image-CALL, by use of MODIFIED 'Values':


If a Subdomain-Call directs to the same 'Place' as the Shop, the DEFAULT PATH Values will will be used, as mentioned above in the REGULAR Dir-Path Description.


...trying to make it a bit more transparent...





YOU HAVE TO MAKE SURE, all images related to the Shop will be placed in the REMOTE Image Folders, if you PLACE the Image-URL into an other SITE-URL. Otherways, your image-'Handler' will not display and/or 'handle' all images related.


You NEED to operate multiple Servers under the SAME ADMIN accessable Server Path, to make it work under different URL's. THIS, because you need to set PATH's and URL's, and it's not possible for a Server to 'catch' DATA from another Server, on the same Server, but Location and Files placed in an 'outside' Customer Server Path'. I hope, someone understands, what I mean..., and I hope to be 'right' with this as well...


This is a typical INTERNAL Server PATH to the MAIN Image SubDir, in contrary to an URL:


Every Site, hosted under the 'YOURNAME' Main Directory, would be 'usable' to store and later call your images.


In the ZIP File enclosed, you find 3 Images, explaining, where TEXT has to be modified/quoted/deleted (whatever you chose), and added as well. SInce it would be of no use, I have not 'printed' the Config-File Commands anywhere, since they would not match your configuration anyway...


Your load time results  will be:

70-85 percent images from http://images... Server

15-30 percent data from http://shop... Server.


I bet!


Good Luck, I tried to cover it in full...







Remarks to the Image Below Subdomains / Aliases:


Sometimes, Sub-Domains are named WEBSITE ALIAS as well, just to avoid Confusion.

Your Server Admin Console should usually allow you to to set them up by yourselfs.


If setting up an ALIAS, you just DIRECT it's PATH to the Server ROOT, where your OC-Shop Main index+config.php files are located. The 'forwarding' to the Images File Directories works the same as by default, 'starting' the Paths from MAIN FILE ROOT as well.



Attached Thumbnails

  • subdomain.jpg

Edited by Ernst Jakob, 04 June 2015 - 07:02 PM.

  • 0

#2 sunsys



  • Members
  • Pip
  • 1 posts

Posted 03 May 2015 - 12:31 PM

Ernie, I have tried to follow your instructions ditto and this is what I have done(everything is on the same server),

The demo site is installed in demosite2.in/demo13 where fresh oc1564 is installed.


What I have done so far:

1. In the root of my registered domain demosite1, I have created an image sub domain called "imgbox2" (so it looks like http://imgbox2.demosite1.in

2. Then I have modified both configs like:

2a. define('HTTP_IMAGE', 'http://imgbox2.demosite1.in/');      and       define('HTTPS_IMAGE', 'http://imgbox2.demosite1.in/');

2b. define('HTTP_IMAGE', 'http://imgbox2.demosite1.in/');      and       define('HTTPS_IMAGE', 'http://imgbox2.demosite1.in/');

2c. define('DIR_IMAGE', '/home/root/public_html/imgbox2/');


and I have done the change as described by you in "remoteimages.zip" by this fix_image_subdomain.xml file which I got from OC forum. 

and so far things are ok and I can see the images of the products on the site but, and always there is a but, that some images are not resolving correctly through the subdomain: imgbox2, like for example the opencart logo is still looking for the image in demosite2.in/demo13/image folder which is obviously not present though the image file manager(resolving correctly to the sub domain-imgbox2) in admin panel allows me to set the opencart logo correctly but is just not showing in the shop header.


So what should I do to see that all images everywhere in the shop resolve to the sub domain imgbox2 folder. Please help.


Thank You Ernie. 

Edited by sunsys, 03 May 2015 - 01:33 PM.

  • 0

#3 Ernst Jakob

Ernst Jakob

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationSwitzerland

Posted 15 August 2015 - 05:04 PM

> So what should I do to see that all images everywhere in the shop resolve to the sub domain imgbox2 folder. Please help. <


Sorry for the long delay, I was not aware of any new postings about this here.


Unfortunately, not all images in OC are lined exactly the same way. By examples, in the theme/template/header.tpl,

I have manually replaced the 'internally' linked images the way as shown below, to make 'em HTTP_HREF - adressable,

in addition to avoid them to be CALLED trough a COOKIE-DOMAIN, by JUST removing the http;//WWW/ Characters, since

my Shop is configured to be addressed 'http://www.myshop.com'


Sample Lines Header.tpl:

<div id="logo"><a href="<?php echo $home; ?>"><img src="http://hitline.info/.../logo.png......
<div class="warning"><?php echo $error ?><img src="http://hitline.info/...close.png......
<a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?> &nbsp; <img src="http://hitline.info/.....
<a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?> &nbsp; <img src="http://hitline.info/shop/catalog/....


In addition, many MOD's/Extensions contain IMAGE PATHS, and/or IMAGE LINKS, using the DEFAULT DIR_IMAGE Path to address Images, but by use of an Image SUbdomain, one needs to change such Link/PATH's to HTTP_IMAGE as well, to make those Mod's work.


In other Mod's, I had to insert the full Image Site url:

      <?php if ($product['image']) {
          $img_file = "http://images.openshop.li/shop/image/" . $product['image'];

instead of (weary!) stuff like this:

      <?php if ($product['image']) {
          if (class_exists('MijoShopOpencart')) {$mijoshop = '../components/com_mijoshop/opencart/admin/';} else {$mijoshop = '';}
          $img_file = $mijoshop . "../image/" . $product['image'];

as, by example, in the nice:

Admin - Sale Order 2.9 - CZ faktura - OC 1.56x (dodlist-faktura-DPH) (admin-vqmod)


just to give you an impression, on how it can be done, if you really want to make it 'complete', troughout your Shop, and including
all the Mod's, you probably have installed.


I have updated the content of the File a little:



Good Luck


  • 0

#4 siyuefa



  • Members
  • PipPip
  • 28 posts

Posted 18 September 2018 - 01:23 AM

In maglie calcio a poco prezzo, you are faced with piles of overstocked or outlined Products, readily available for sale at great and reasonable discounts equipaciones de futbol baratas. Some camisetas de futbol baratas are even marked won everyday! Just think of how much it will be beneficial to you -most especially when the magliette calcio is facing great economic struggles.So while you may not have amassed much of a savings maillot pas cher psg, you've prepared yourself for your future by investing in other camiseta atletico de madrid. You've stockpiled a massive arsenal of fashion maillot de foot pas cher that will last a lifetime. You have a comprar camisetas de futbol baratas for every outfit. You look great at all your maillot psg pas cher and best of all, you'll never have to buy another the rest of your life! A kate spade outlet handbags has passed and today you are celebrating. You've landed your first real job. Moreover these fake are very good copies of genuine, branded camisetas del real madrid. Generally there is a minor difference only in their chaussure homme louboutin. Some shrewd even use the comprar camisetas de futbol that is very closer to the original cheap soccer jerseys. Such maglie calcio poco prezzo are enough to confuse the prospective hola camisetas baratas.

  • 0

#5 alanabui



  • Members
  • Pip
  • 3 posts

Posted 08 March 2019 - 07:43 AM

I think you are right to say so. Your share is great, I found a lot of things in your post papas pancakeria

  • 0

#6 seo geblek

seo geblek


  • Members
  • Pip
  • 5 posts

Posted 14 February 2020 - 08:35 AM

kepuasan dalam bercinta bisa diraih oleh kedua pasangan asal selalu menjaga stamina sebelum beraktifitas seksual, namun akhir-akhir ini banyak wanita yang mengeluh karena banyak pria yang tidak bisa memberi kepuasan lantaran mereka mengalami disfungsi ereksi sehingga alat vital tidak dapat ereksi ketika mau berhubungan intim, dengan hadirnya pil biru asli cod di cikarang bisa memberikan segalanya bagi pasutri yang ingin mencapai klimaks ketika berhubungan badan baca seterusnya . pria lebih membutuhkan obat kuat untuk menunjang keperkasaan mereka saat diranjang, salah satu pilihan yang banyak direkomendasikan oleh pakar ahli kesehatan adalah klg semarang yang terbuat dari ramuan herbal yang sudah teruji khasiatnya. rekomendasi yang baru-baru ini adalah permen soloco asli cod di bandung yang dapat memberi kepuasan maksimal dalam berhubungan badan. kebutuhan biologis memang sangat penting untuk anda perhatikan karena jika sampai hal ini kita diamkan maka bisa mengakibatkan retaknya hubungan keluarga hingga dapat menimbulkan penceraian. jual permen soloco cod di karawang barat solusi terbaik bagi pria yang tidak bisa mengonsumsi jenis tablet karena rasanya yang pahit. baca disini . banyak kelebihan yang dimiliki permen soloco salah satunya adalah memiliki rasa coklat yang kebanyakan disukai oleh pria maupun wanita dengan rasa yang khas. klik disini . wanita butuh hubungan yang lama agar libidonya bisa terangsang sampai puncak klimaks. procomil spray sangat cocok untuk mengatasi ejakulasi dini pria ketika sedang berhubungan badan. info lebih lanjut . mengenal lebih jauh tentang vitamale yang merupakan obat kuat bpom yang dibuat diindonesia berkhasiat untuk memelihara stamina pria agar tetap kuat saat diranjang klik web . banyak pria yang mencari vimax spray untuk memuaskan pasangan mereka supaya tidak cepat keluar sperma ketika sedang berhubungan intim.

  • 0

Reply to this topic



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Community Skin by Fredson Nunes Junior