Fix comment to match filename
Merge pull request #5 from bergal/patch-1

Fix comment to match filename
Adjustments to .htaccess:

 - Make sure the rewrite only matches at the end of the file and not anywhere in the path
 - Anal regex changes (no capture of the extension and merged jpg/jpeg)
Merge pull request #6 from Seldaek/patch-1

Adjustments to .htaccess:
* Make sure the rewrite only matches at the end of the file and not anywhere in the path
* Anal regex changes (no capture of the extension and merged jpg/jpeg)
Whitespace/formatting fixes
Strings must be quoted
Set the public directive on the Cache-Control header since this is HTTP/1.1, Pragma is a hack for very old things. Also fixed maxage to be max-age
dl doesn't always exist
more return-early and whitespace fixes
Code Re-use: Refactored all error images into a function
Use parse_url instead of string parsing
Refactored the whole code, fixes #4
Add protection against race conditions
Remove most use of globals and some more duplicated code
Send highest configured resolution for non-mobile first no-cookie requests, fixes #3
Shortened JS snippet
Merge pull request #7 from Seldaek/fixes

Accept the refactored code from Seldaek.

This fixes #4 and #3 while I was at it. Also took care of some other small issues (php E_STRICT warnings, race conditions that could've happened, fixed the cache headers).
Merge pull request #8 from Seldaek/jsfix

Shortened JS snippet
Version 1.3 final

Mobile First is set to TRUE by default (this means if JavaScript is
unavailable AI will send the smallest version), PHP has been
re-factored, a change-log has been added (see that for more details)
Fix typo in comments