MMv4 KB
 
Prevent broken content in "webpage" Digital Objects
  Last Edited - 03/30/2012 7:45am PDT
  Category Path - Shopping Cart Software Components > Administration Area > Modules > Digital Delivery > FAQs & Tutorials
 
When using a webpage as a Digital Object, precaution must be taken in order to ensure that all images, JavaScript files, CSS style sheets, Flash and all other content that is linked to in the page's source code will be displayed correctly.

All such content must be linked to using global links. A global link is one that includes the full URL to the item, including http://.

global vs. local links
For example, all image tags on a webpage that is used as a Digital Object should be formatted with global links like this:
<img src="http://www.mydomain.com/images/my_image.gif">

Not by using relative links like this:
<img src="/images/my_image.gif">

everything linked to must use global links
All content on the webpage that is linked to must use global links. This includes: images, JavaScript files, CSS files, Flash files, form actions, links to other webpages, etc.

What will happen if relative links are used instead of global links? Any item on the webpage embedded with a relative link will fail to load. Images will be broken, CSS styles will not be loaded, etc.

Below is an example of a webpage used as a Digital Object. When the Access Webpage button in the store’s download area is clicked, the webpage's content is loaded in the browser — without revealing the webpage's URL to the customer.

This version of the webpage used relative links to embed images and CSS stylesheets.



Yikes.

Here's the same webpage, this time using global links to embed images and CSS stylesheets.



Much better!

the science behind global links
The reason that global links are required is because of the secure manner in which the webpage is loaded.

In order to prevent the URL of the webpage from being revealed to the customer, the shopping cart software makes the customer's web browser think the URL of the protected webpage is actually that of your store's download area.

Since the webpage's URL is being "masked" in this way, it is necessary for all embedded content to be linked globally, so that the web browser can find the content on the internet using its global address.
Powered by ModularKB