Link to home
Start Free TrialLog in
Avatar of ddantes
ddantesFlag for United States of America

asked on

Adaptive Image Issue

I'm testing an adaptive image solution which redirects image requests to a PHP file, and serves an image size which is appropriate to the user's browser width.  I'm testing this with Wampserver, and having some challenges.  If the system is working correctly, a folder in the server root directory, called ai-cache, should accumulate some images as server requests are made.  The contents of that folder remain empty.  If you can assist in troubleshooting this, please do.

Wampserver uses Apache 2.2.21 and PHP 5.3.8 with the extension GD2 enabled.
The web page with images, which I am loading in my virtual server, has the following code in the <HEAD> section:
<script type="text/javascript">document.cookie='resolution='+Math.max(screen.width,screen.height)+("devicePixelRatio" in window ? ","+devicePixelRatio : ",1")+'; path=/';</script>

I'm attaching the php file and a text file with contents of the .htaccess, which both reside in the server root directory, along with a writeable folder called ai-cache.

adaptive-images.phphtaccess-text.txt
ASKER CERTIFIED SOLUTION
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddantes

ASKER

Thank you.