Solved

Adaptive Image Issue

Posted on 2013-05-24
2
512 Views
Last Modified: 2013-05-26
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
Comment
Question by:ddantes
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39196248
0
 

Author Comment

by:ddantes
ID: 39196739
Thank you.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
LINUX CENTOS + APACHE 9 37
wordpress issue 2 24
Help cleaning out CSS 2 32
Different Delete Messages 7 23
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now