image-caching

SDWebImage and setting custom HTTP headers?

冷暖自知 提交于 2019-11-27 13:38:21
问题 I´ve just changed my code for caching images away from EGOImageCache to SDWebView. Unfortunately i don´t know how to set custom HTTP headers as i have to send authentification to be able to fetch images. It was easy done with EGOImageCache as i´ve extended the NSURLRequest at the appropriate place. But i don´t know how to do that with the SDWebView.framework. I see the headers and i´ve found methods in SDWebImageDownloader.h containing /** * Set a value for a HTTP header to be appended to

Using image.complete to find if image is cached on chrome?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 09:07:38
I have been trying to find out if an external image is cached on the browser with js, this is the code I have so far: <html> <head></head> <body> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script> function cached( url ) { $("#imgx").attr({"src":url}); if(document.getElementById("imgx").complete) { return true; } else { if( document.getElementById("imgx").width > 0 ) return true; } return false; } </script> <img id="imgx" src="" /> <script> $(document).ready(function(){ alert(cached("http://www.google.com/images/srpr/nav_logo80.png")); }); </script> </body> </html> It

Android java.lang.OutOfMemoryError?

淺唱寂寞╮ 提交于 2019-11-27 05:43:27
问题 04-25 08:19:10.111 2431-2603/com.example.francesco.guidedautorewithtabs E/art﹕ Throwing OutOfMemoryError "Failed to allocate a 4194316 byte allocation with 1983651 free bytes and 1937KB until OOM" 04-25 08:19:10.114 2431-2603/com.example.francesco.guidedautorewithtabs E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 285 Process: com.example.francesco.guidedautorewithtabs, PID: 2431 java.lang.OutOfMemoryError: Failed to allocate a 4194316 byte allocation with 1983651 free bytes and 1937KB until OOM

Is there a way to force browsers to refresh/download images?

China☆狼群 提交于 2019-11-27 00:26:23
I have a problem where users are reporting that their images aren't being uploaded and the old ones are still there. On closer inspection the new images are there, they just have the same name as the old one. What I do on the upload is that I rename the images for SEO purposes. When they delete an image the old index becomes available and is reused. Therefore it has the same image name. Is there a way to (i thought maybe there might be a meta tag for this) to tell the browser to not use its cahce? The better answer is to rename the image to something totally new. I will get working on that but

Using image.complete to find if image is cached on chrome?

£可爱£侵袭症+ 提交于 2019-11-26 14:31:11
问题 I have been trying to find out if an external image is cached on the browser with js, this is the code I have so far: <html> <head></head> <body> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script> function cached( url ) { $("#imgx").attr({"src":url}); if(document.getElementById("imgx").complete) { return true; } else { if( document.getElementById("imgx").width > 0 ) return true; } return false; } </script> <img id="imgx" src="" /> <script> $(document).ready(function()

Is there a way to force browsers to refresh/download images?

拟墨画扇 提交于 2019-11-26 12:23:55
问题 I have a problem where users are reporting that their images aren\'t being uploaded and the old ones are still there. On closer inspection the new images are there, they just have the same name as the old one. What I do on the upload is that I rename the images for SEO purposes. When they delete an image the old index becomes available and is reused. Therefore it has the same image name. Is there a way to (i thought maybe there might be a meta tag for this) to tell the browser to not use its

Website image caching with Apache

五迷三道 提交于 2019-11-26 01:58:02
问题 How can I get static content on Apache to be {cached by browser} and not {checked for freshness {with every request}}? I\'m working on a website hosted on Apache webserver. Recently, I was testing something with headers (Content-Type for different types of content) and saw a lot of conditional requests for images. Example: 200 /index.php?page=1234&action=list 304 /favicon.ico 304 /img/logo.png 304 /img/arrow.png (etc.) Although the image files are static content and are cached by the browser,

How to force a web browser NOT to cache images

一曲冷凌霜 提交于 2019-11-25 23:36:58
问题 Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On that form I allow the administrator to upload an image related to the event. On the HTML page displaying the form, I am also showing a preview of the picture uploaded (HTML img tag). The Problem The problem happens when the