Title: Image caching Post by: edgycorner on May 04, 2018, 06:36:26 PM I have created a small project which helps you to embed live price of coins as image.You can follow it here: https://bitcointalk.org/index.php?topic=3485877
But because of image caching, it can be rendered useless.I can see the same image loading up even after 24 hours :c Is there any solution to this? Or is it a server/user side thing, which can't be changed? Any help will be appreciated .-. Title: Re: Image caching Post by: AdolfinWolf on May 04, 2018, 06:53:57 PM I have created a small project which helps you to embed live price of coins as image.You can follow it here: https://bitcointalk.org/index.php?topic=3485877 But because image caching, it can be rendered useless.I can see the same image loading up even after 24 hours :c Is there any solution to this? Or is it a server/user side thing, which can't be changed? Any help will be appreciated .-. Well, it is kind of, yes. I think it will indeed be cached by default for everyone who uses a normal browser ( tor might not do this), simply because the server tells you to ( cache ) by default.. However, you can manually disable this. I use Chrome, so i'm not too sure how it works for FireFox. on Chrome -> F12, Customize Dev tools -> Settings -> "Disable cache while devtools is open". I just tried loading in your topic a couple times, and the values indeed change. One thing i noticed though is that they 500 a lot of times. https://i.gyazo.com/323005ebc58c1f02934223a578f934b9.png Theymos could indeed disable this, or lower the default time to cache certain stuff from what it is now to 10 minutes or whatever, but i don't really see why he should. It'll massively increase bandwidth for no other reason then some (sorry :P) useless price tickers you can see everywhere. Title: Re: Image caching Post by: edgycorner on May 04, 2018, 07:19:49 PM I have created a small project which helps you to embed live price of coins as image.You can follow it here: https://bitcointalk.org/index.php?topic=3485877 But because image caching, it can be rendered useless.I can see the same image loading up even after 24 hours :c Is there any solution to this? Or is it a server/user side thing, which can't be changed? Any help will be appreciated .-. Well, it is kind of, yes. I think it will indeed be cached by default for everyone who uses a normal browser ( tor might not do this), simply because the server tells you to ( cache ) by default.. However, you can manually disable this. I use Chrome, so i'm not too sure how it works for FireFox. on Chrome -> F12, Customize Dev tools -> Settings -> "Disable cache while devtools is open". I just tried loading in your topic a couple times, and the values indeed change. One thing i noticed though is that they 500 a lot of times. https://i.gyazo.com/323005ebc58c1f02934223a578f934b9.png Theymos could indeed disable this, or lower the default time to cache certain stuff from what it is now to 10 minutes or whatever, but i don't really see why he should. It'll massively increase bandwidth for no other reason then some (sorry :P) useless price tickers you can see everywhere. https://i.imgur.com/SdalhwE.png I will look into the logs. I don't expect theymos to change that either :v I am hoping for a solution that might prevent the browser from caching it. Just like you can use noCache=true, but it isn't working here because(maybe) the images are tunneled via a proxy too .-.(imo it's a good thing, else people could track your IP address by your visit). You posted it on the wrong section. This section is for forum related topics. May be you consider moving it to some other board if I am not mistaken. My query is related to the forum.Probably it belongs here.Title: Re: Image caching Post by: theymos on May 04, 2018, 08:07:43 PM Send an appropriate Expires or Cache-Control header.
Title: Re: Image caching Post by: mdayonliner on May 04, 2018, 08:16:39 PM My query is related to the forum.Probably it belongs here. Yes you are right. My bed and accept my sincere apology.Title: Re: Image caching Post by: edgycorner on May 04, 2018, 08:33:16 PM Send an appropriate Expires or Cache-Control header. It WORKED :D I added Code: header( 'Cache-Control: max-age=6' ); Now images are getting cached for just 6 seconds :DDDD Arigato sensei .-.-.-.-. My query is related to the forum.Probably it belongs here. Yes you are right. My bed and accept my sincere apology.My query is related to the forum.Probably it belongs here. Yes you are right. My bed and accept my sincere apology.Thanks again for your help Theymos. Locking this thread. Title: Re: Image caching Post by: mdayonliner on May 04, 2018, 08:37:25 PM My query is related to the forum.Probably it belongs here. Yes you are right. My bed and accept my sincere apology.mdayonliner edgycorner Quickseller All three are mine LOL Title: Re: Image caching Post by: edgycorner on May 04, 2018, 08:38:56 PM My query is related to the forum.Probably it belongs here. Yes you are right. My bed and accept my sincere apology.mdayonliner edgycorner Quickseller All three are mine LOL mdayonliner=Quickseller Me=Quickseller Mind=Blown |