← Back to context

Comment by joshyi

7 years ago

I'm able to get the screen size with goaccess. I placed a bogus <img> in the document. e.g.,

<img src="/images/1px.png?"+screen.width+"x"+screen.height+"x"+screen.colorDepth+" />

That's a nice idea, but it requires wrapping script tags around the "pixel", right?

  • That's right. e.g.,

    <script> document.write("<img src=\"/images/1px.png?" + screen.width + "x" + screen.height + "x" + screen.colorDepth + "\" />"); </script>