Improved transparent GIF in CrazyStat

Post your ideas on features for CrazyStat, improvements, wishes etc. here.
Forum rules
You can find my list of todos here to see what is already planned for CrazyStat. But feel free to request anything that comes to your mind, even if it is already on the list (but don't complain if I just answer "already on the todo" then... ;-) ). A "+1" reply is always welcome.

Preferred language of discussion is English so most users can profit from your threads, but German is okay as well.

Bevorzugte Sprache ist Englisch, damit möglichst viele Nutzer von den Threads profitieren können, aber Deutsch wird auch akzeptiert.
Post Reply
uwe

Improved transparent GIF in CrazyStat

Post by uwe » Sat Feb 21, 2015 7:00 am

Hi there.

I just improved a part of CrazyStat to silence Google PageSpeed Insights. Idid the following change in src/stat.php, starting at line 287:

Code: Select all

		// directly output a blank gif without HTTP-redirect
		header('Content-Type: image/gif');
		//header('Content-Length: 807');
		// now output a blank 1x1 gif
		//echo base64_decode(
		//		'R0lGODlhAQABAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///wAAAA0NDRoaGigoKDU1NUNDQ1BQUF1dXWtra3h4eIaGhpOTk6Ghoa6urru7u8nJydbW1uTk5PHx8f///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAANcALAAAAAABAAEAAAgEAK8FBAA7');
		header('Content-Length: 42');
		echo base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
This reduces the size of the transparent GIF to a mere 5% of its original size.

Post Reply