FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » totally WEIRD bug? Firefox caching?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: totally WEIRD bug? Firefox caching? [message #185372 is a reply to message #185371] Thu, 20 March 2014 18:39 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 20/03/14 14:53, Arno Welzel wrote:
> Am 20.03.2014 12:26, schrieb The Natural Philosopher:
>
>> On 20/03/14 09:13, Arno Welzel wrote:
>>> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>>>
>>>> I have TWO IDENTICAL PHP FILES.
>>>>
>>>> They are supposed to display an image got from a database.
>>>>
>>>> One does. The other does not.
>>>>
>>>> It persistently tells me the image is corrupted.
>>>>
>>>> I have even copied one file that works directly over the other. It still
>>>> doesn't work.
> [...]
>> What is happning - and oddly running it against a test version of IE6 in
>> my XP VM showed it up, was that it was outputting a '404 file not found'
>> text BEFORE outputting perfectly valid PNG.
>>
>> Why this is happening is a bug somewhere else completely.
>>
>> IE 6 simply showed the text and the binary gobbledygook which was the
>> clue I needed.
>
> Yes, because IE 6 assumes the user may not understand a server generated
> error message and shows its own message as long as the reponse is below
> a certain size limit (AFAIR less than 4000 bytes, but i may not remember
> correctly). This is even more annoying - sometimes you see the message
> from IE itself and sometimes
>
>> How this has happened will take me some time to understand because the
>> line that says '404 not found' is followed - or I thought it was - by
>> an exit(); statement.
>>
>>> Either Firefox once got an invalid image and cached the response or the
>>> server does not respond the way you think. Maybe a BOM in the PHP file?
>>> This may not be visible in your editor, but it can cause all sort of
>>> problems.
>>>
>>>
>> Firefox makes it hard to debug because it DOES cache bad results: I
>> usually fix that by sending random nonsensical GET parameters which are
>> ignored to ensure it thinks its a different URL each time.
>>
>> It a huge minus against firefox that it didn't - even using the
>> debugging console - show me what was really going on, whereas IE6 did.
>
> You should learn to read HTTP response headers in the developer console
> of Firefox. When I open <http://arnowelzel.de/wiki/en/tools/rwinfo>
> there the developer console of Firefox tells me EXACTLY what is going on:
>
> 1) The server responded with a status code 404 (not found)
>

The problem is that it didn't send an error code in the header

It sent a valid header, the some error text, and then the PNG

I generate all my own headers so there's a strange bug somewhere, but at
least I know where to look.


> 2) The response contains a number of headers which are also displayed
>
>
>
>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: sqlite2 vs sqlite3
Next Topic: willing to hire someone who knows both JS and PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 23:12:35 GMT 2024

Total time taken to generate the page: 0.04479 seconds