views:

22

answers:

1

Here's the scenario: we have a separate app running on a computer (outside of the browser). It creates a folder with 10,000 downloaded thumbnail images.

In the browser, we have a traditional browser app. It lets you browse through these images. In order to speed up the browsing dramatically, I want to let the app get the images from the local drive, if available, ie. img src="C:/..." instead of img src="http://..."

The app can talk to the server, and let it know the path to the images.

I'm trying to figure out how to (lightweight) let the browser know that on this particular computer, we have a folder with images, whereas on another particular computer, we may not.

My best guess so far is have the app write a cookie to the browser. Is that the easiest/most elegant/most lightweight way of doing this?

A: 

The app could just add some javascript variable to the page. e.g. for PHP

if($hasImagesFolder) echo "var hasImagesFolder = true;";
else echo "var hasImagesFolder = false;";
Chad