Improving Image load times when using iNomads

Started by PxPlus, July 12, 2018, 11:22:24 AM

Previous topic - Next topic

PxPlus

When using iNomads and displaying an image the system normally will place a copy of the image in the sessions temporary working directory from which it will be loaded by the generated HTML.  In cases where you have many primarily static images (such as a product image library) copying the image to the temporary directory may add unnecessary overhead.

There is a way to setup iNomads to avoid this processing load by supplying a lookup file for image path names.  Defining this file can be done in the iNomads System Configuration -> Pathnames tabs.  There, on the application server, you can specific the path name to a file which will be used to map the image paths you use in the program to actual URLs which will be used in the generated HTML.

Simply create a file whose primary key is the image path name as is used by the program and in the first field put what you want inserted in the src=xxxxx clause in the generated pages. 

The file is only needed on the server running the application as this replacement is done by the iNomads object.  Using this lookup file will allow you to place your images in a location directly accessible by URL, will eliminate the need to copy the images to the temporary directory, and will improve overall system performance as the workstation browsers will be able to cache the images locally.

Image files whose path names are not the lookup file will use the existing standard process.

Note about Windows
If your application takes advantage of the fact the the Windows file system is case insensitive, the primary key used for the file will also need to be defined as case insensitive.  To do this instead of using an external key for the lookup file, make the primary key as the second field on the file, case insensitive (option "U" or "L") and load the file accordingly.

Back slashes, if used, are converted automatically to forward slashes both for the key field (the path name) and in the URL.