You are here: Re: Problem with updating photos « PHP Programming Language « IT news, forums, messages
Re: Problem with updating photos

Posted by Jerry Stuckle on 01/21/08 23:21

MZ wrote:
>
> Użytkownik "MZ" <marcinzmyslowski@poczta.onet.pl> napisał w wiadomości
> news:fn2t7i$u6l$1@news.onet.pl...
>>
>> Użytkownik "Jerry Stuckle" <jstucklex@attglobal.net> napisał w
>> wiadomości news:S7-dnS-A-K21awnanZ2dnUVZ_uHinZ2d@comcast.com...
>>> MZ wrote:
>>>> Hello all!
>>>>
>>>> I wrote a script to add or update photos no more than 50 KB size.
>>>> After adding photo I have possibility to update it (I mean change
>>>> the photo into the other one, so not adding another photo). After
>>>> updating I see still old photo, but this old photo is enlarged, I
>>>> mean that this old photo has sizes (widht & height) of a new photo
>>>> (just updated) but I still see this old photo, and not a new photo
>>>> just updated.
>>>>
>>>> This problem occurs in IE 7.0.. When I update photos in Firefox,
>>>> everything works fine. I can add, update photos and always I see
>>>> proper photos, that is I see new photos after updating them.
>>>>
>>>> I have such code:
>>>>
>>>> <?
>>>> function setExpires($expires) {
>>>> header(
>>>> 'Expires: '.gmdate('D, d M Y H:i:s', time()+$expires).'GMT');
>>>> }
>>>>
>>>> setExpires(1);
>>>> header('Cache-Control: no-store, no-cache, must-revalidate');
>>>> header('Cache-Control: post-check=0, pre-check=0', FALSE);
>>>> header('Pragma: no-cache');
>>>>
>>>> include ("configuration.php"); //setting session_start() and other
>>>> things
>>>>
>>>> include ("gallery.php"); //script to add and update photos
>>>>
>>>> ?>
>>>>
>>>> and after above code I have such code:
>>>>
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>>>> <HTML>
>>>> <HEAD>
>>>> <TITLE>Tytul</TITLE>
>>>>
>>>>
>>>> I have tried to change header() but it didn`t solve the problem.
>>>>
>>>> Please help me.
>>>> Any help apprieciated
>>>>
>>>> Thank you in advance
>>>> Marcin.
>>>>
>>>>
>>>
>>> Clear your browser cache. This isn't a PHP problem.
>>>
>>> --
>>
>>
>> OK. But I cannot force every user and every visitor of my page to
>> clear cache
>> everytime they update photo. Is it possible to do it using some code?
>> Maybe is it possible to implement this in JavaScript?
>>
>> M.
>>
>>
>
>
> I`ve done this but in the other way:
>
> <img src="images/galeria/zdjecie.jpg?<?=time(); ?>
>
> It works
>
> Thank you in advance
> Marcin
>

It will work, but it will eliminate all caching of the image by the
client. The result can be a fair increase in required bandwidth, plus
slower loading for the client.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация