[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

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
0
ddantes
Asked:
ddantes
1 Solution
 
ddantesAuthor Commented:
Thank you.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now