Solved

images used in pdf generation on cloud stored in separate subdomain

Posted on 2014-10-10
10
80 Views
Last Modified: 2014-12-07
Hi

I have a php website where the logo uploads are in a separate subdomain. The website is hosted on the cloud

I cant see a reason why. However the images are used in pdf generataion

Could this have anything to do with it (addressing for thte pdf?) as i see no reason for the images not to be part of the main site with the rest of the images

thanks
0
Comment
Question by:andieje
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 40373952
I would have expected the images to be with the main site. The only time I recall seeing images (and CSS and static HTML pages) being hosted on different domains or subdomains had to do with some sort of attempt at performance enhancement but it never struck me as worth the effort and I have never seen it repeated.

It could be something as simple as a limitation in the code generating the PDFs. Maybe using one subdomain allows the images to be freely moved around with breaking filepaths and such as the images on a subdomain are (I presume) always in the "root" folder
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40373983
You might want to find the developer who did that originally and ask "why?"  This is an unusual arrangement, so there is probably some kind of backstory that we can't see.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 40374051
@Ray - I did a little bit of digging and apparently WordPress uses this to "speed up" site loading. Personally I cannot see it making a discernable difference. The argument is the number of TCP sockets per connection to download things. By using a separate subdomain you double the number of download sockets. Or some such .....

I doubt it would do much for PDFs but I cannot find any other reason. The only advantage I can see it conferring is the reduction in URL length as all images are at the "top" of the path's folder lists.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40374061
Interesting... I agree that it would probably not make much difference, given that WP loads so many script files.  All of the WP pages are slow compared to bespoke web sites, but that's just the nature of frameworks.  I'm wondering if there is some other reason -- perhaps licensing the images in a unique way or something like that?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40374278
Having static resources served from a CDN allows for more concurrent downloads in the browser and ergo a faster loading website.
Very common, especially in image intensive websites.
If the browser is stuck downloading 100 images from your site then it cannot do anything else til they have finished, by offloading it to a different server it allows your website to continue loading.
0
Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40374297
@Gary: Yes, good point.  But a CDN in a separate subdomain?  I just haven't seen anybody do that.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40374304
I use it all the time for all static stuff like css, js etc, it's not quite a cdn but it is in many ways
Eliminates cookies and allows parallel downloads.

I said different server (though there is an advantage to that as well if it is more local to the visitor), but I should have said different website as mysite.com is not the same as www.mysite.com
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40374317
I think "mysite.com" probably resolves to a local DNS, and it would be the same local DNS as test.mysite.com, docs.mysite.com. www, etc.  I would refer to these as different sub-domains of the same web site.  Different terminology, but I think we are saying the same thing.
0
 

Author Comment

by:andieje
ID: 40388832
I asked,. He didnt know. Shall i close the question it a dead end
0
 

Author Closing Comment

by:andieje
ID: 40485719
thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Join & Write a Comment

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now