ebolt007 Posted March 4, 2012 Share Posted March 4, 2012 So I have a page that has profile images basically, but these images cache and when someone clicks on anything, like rotate image, since my script rotates the image and saves it correctly, I can hit Ctrl+F5 and the image then shows up correct, but the page loading itself after running my script using a get method and then using the header coming back to the same page the image looks like it wasn't reloaded. Noones gonna hit Ctrl+F5, so how do I get this to cache the image completely when the page reloads? I've tried <meta http-equiv="pragma" content="no-cache" /> But this doesn't work, well nothing seems to work really. Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/ Share on other sites More sharing options...
requinix Posted March 4, 2012 Share Posted March 4, 2012 The image itself is being cached, not the webpage displaying it. Your server should be set up to send correct caching headers with images. Normally they are by default but apparently not yours. What web server are you using? Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323864 Share on other sites More sharing options...
ebolt007 Posted March 4, 2012 Author Share Posted March 4, 2012 I'm using Godaddy. So how do I set the changes? Is it a .htaccess thing? Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323895 Share on other sites More sharing options...
requinix Posted March 4, 2012 Share Posted March 4, 2012 Eww, GoDaddy. Throw a FileETag All in your .htaccess and see if that changes anything. If not, is there a URL you can share so we can see it for ourselves? Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323901 Share on other sites More sharing options...
ebolt007 Posted March 4, 2012 Author Share Posted March 4, 2012 Ok, I guess it's far enuff along to show the URL. http://www.thetrue1.com/ That didn't seem to work, and I know I need to do a different server, but I got Godaddy just to try different things and have a server to play on. When you goto the site, you can login using username:GuyDefault and password:test1234 then if you goto MyAccount>Edit Pictures and click on the gallery, you'll see the images, and either make one of a profile picture, or try using the rotating image button and it won't seem to work unless you ctrl+F5 it. Hopefully you like the site too. Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323909 Share on other sites More sharing options...
requinix Posted March 5, 2012 Share Posted March 5, 2012 It's working for me. Did you Ctrl+F5 after updating the .htaccess? Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323942 Share on other sites More sharing options...
ebolt007 Posted March 5, 2012 Author Share Posted March 5, 2012 Yeah, I ctrl+F5'd it again and it still doesn't work just now. When I click rotate either direction, it just says it's rotating then refreshes the page but the image doesn't rotate unless I hit ctrl+F5 then it finally changes, same with setting a profile image. Maybe I just have something super cached in my system. I'll try on another computer later too. Just tried in both IE and Firefox tho. Thanks tho, hopefully you like the site. Quote Link to comment https://forums.phpfreaks.com/topic/258269-clear-cache-of-images-on-page-load/#findComment-1323946 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.