Flickering Buttons - Images not Cached

knowledgebase

#1

Hi there,

I’m not sure whether this has been posted here before, but when I create a HYPE document with buttons that have .png hover states once uploaded onto the server the buttons flicker on rollover. As far as I can tell it’s a bug but has anyone else had this problem, and if so how was it rectified? I’ve tried allowing caching etc. but that doesn’t seem to work.


#2

@ben17, do you have a hype doc you can upload that can be looked at?


#3

Thanks for the response! But I have figured out it’s a server issue and not a Hype issue, which has sorted out many of my problems. Cheers.


#4

For others who hit this issue, it has to do with servers not sending out caching headers. When hovering a button, an image which should be ready to display needs to download again. To fix this, add the following .htaccess file to your document’s directory: https://gist.github.com/themorgantown/4758846.

To test what caching headers are being sent from your server, open Terminal and run this:

curl -I http://site.com/image.jpg

If your file is being cached, you’ll see something like this in the output:

Expires: Sat, 25 Oct 2015 23:07:42 GMT
Cache-Control: max-age=2592000

More info on setting this up.


#5

Thanks for the info! Thats a huge help.