diff --git a/instructions.htm b/instructions.htm index cba8e0a..999ef99 100644 --- a/instructions.htm +++ b/instructions.htm @@ -25,7 +25,10 @@
Copy the following Javascript into the <head> of your site. It MUST go in the head because it needs to work before the page has finished loading, and before any images have been requested.
<script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';</script>
That's it, you're done.
-NOTE: you do not need the ai-cookie.php
file unless you are using the alternate method of detecting the users screen size. So delete it if you like, no one likes mess.
NOTE 1: if you would like to take advantage of high-pixel density devices such as the iPhone4's Retina display you can use the following JavaScript instead. + It will send higher-resolution images to such devices - be aware this will mean slower downloads for users.
+<script>document.cookie='resolution='+(Math.max(screen.width,screen.height)*("devicePixelRatio" in window ? devicePixelRatio : 1))+'; path=/';</script>
+ NOTE 2: you do not need the ai-cookie.php
file unless you are using the alternate method of detecting the users screen size. So delete it if you like, no one likes mess.
I strongly advise you to duplicate that file so you can revert to it if things go pear-shaped.