Mawhorter.net Forums

Home of the facelift image replacement forums

You are not logged in.

Announcement

It looks like recaptcha is easily thwarted either by cheap labor or some other means, because I am still getting tons of spam signups.

I'm closing registrations again, if you would like to register, please email me at cory.mawhorter@ephective.com and use the subject line "Forum Registration". Give me your name and all the standard stuff in that email.

I will just have to do manual registrations until I have more time to spend on this problem.

-Cory, 2010-03-15

#1 2008-11-07 18:36:14

tzaddi
Steve
Registered: 2008-11-07
Posts: 8

FLIR working inconsistently, and application octet-stream issue

I'm having two issues which could be related, not sure. I have a wordpress site under development with installed FLIR manually (not using the wp plugin).

Issue 1 - Fonts are generally replacing fine however on some refreshes certain elements won't show the FLIR font (Lithograph). The main navigation, all heading tags, and the left column links should all be Lithograph. Sometimes half of the nav will be Lithograph, other half non-FLIR font.

Issue 2 - occasionally when I click a link in the site I get a Firefox pop up saying I've chosen to download an "application octet-stream".  Similar in IE.

Site: http://www.bearwoodmusic.com/wp/

Anyone experienced this? Ideas?

Thanks in advance for any suggestions!

Offline

 

#2 2008-11-08 12:42:59

cory
Administrator
From: Detroit
Registered: 2008-08-05
Posts: 929
Website

Re: FLIR working inconsistently, and application octet-stream issue

Issue 1 - Fonts are generally replacing fine however on some refreshes certain elements won't show the FLIR font (Lithograph). The main navigation, all heading tags, and the left column links should all be Lithograph. Sometimes half of the nav will be Lithograph, other half non-FLIR font.

I can't get this to happen.  I refreshed many times with my cache enabled/disabled.  Every time it downloaded the image. 

Issue 2 - occasionally when I click a link in the site I get a Firefox pop up saying I've chosen to download an "application octet-stream".  Similar in IE.

Hmm... you say it happens in IE?  One other person complained of a similar problem but I chalked it up to a bug with a FF extension.  I had a similar problem with more than FLIR sites until I disabled some extensions.  There is no reason that Facelift should be causing this, though... it doesn't do anything to the actual links and just puts an image in between the <a></a>.

I'm curious, what exactly do you get in IE?


Check out Facelift v2.0 beta 3.  The best version yet.

Offline

 

#3 2008-11-10 14:08:59

tzaddi
Steve
Registered: 2008-11-07
Posts: 8

Re: FLIR working inconsistently, and application octet-stream issue

Cory, thanks for looking into it. I should have noted I was using a PC and had done little testing on a mac, in case that makes a difference. Also the IE I had tested in was IE6. I still try to support that for the most part :P

I dug around some more - maybe the following will be helpful to someone else.

I think that Issue #1 may have been from a caching plugin. Once I turned that off the fonts seem to replace more consistently.

I also fixed a couple CSS validation errors.

Issue 2 is now only happening in IE6. (Fine in IE7 and FF Mac/PC.) In IE 6 I occasionally get a "File Download" pop up which says "Some files may harm your computer. If the file information below looks suspicious..." Below that it says the title of the link I clicked on, blank file type. Gives me the option to save the file. The file contains:
.‹.      ..         HTTP/1.1 200 OK
Date: Sat, 08 Nov 2008 22:31:32 GMT
Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
X-Powered-By: PHP/5.2.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Pingback: http://www.bearwoodmusic.com/wp/xmlrpc.php
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 1545
Keep-Alive: timeout=2, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8 <...followed by a bunch of unreadable stuff...>

In IE6 I now get Issue#3 sometimes, which is that the titles will have broken image icons and the titles are sort of facelifted. It's like they are 3 layers - text, FLIR overtop of that, then broken image overtop of that.

I didn't see browser support/requirements in the facelift site but I'm thinking I might just disable it for IE6. Any thoughts on that?

Thanks again!

Offline

 

#4 2008-11-10 18:30:15

tzaddi
Steve
Registered: 2008-11-07
Posts: 8

Re: FLIR working inconsistently, and application octet-stream issue

Hmm. I take some of that back. I'm still getting the pop up in both IE6 and FF3 PC occasionally.

Also in FF3 PC, I'm sometimes getting the issue with fonts not transforming for half of the nav/list items, *some* of the time. When I refresh or bounce around and come back to the same page they'll all transform.

Offline

 

#5 2008-11-10 19:27:29

cory
Administrator
From: Detroit
Registered: 2008-08-05
Posts: 929
Website

Re: FLIR working inconsistently, and application octet-stream issue

The download popup has to be a problem with Wordpress.  I'm guessing the mod_rewrite rules it uses maybe. 

There should be no reason for this header:
X-Pingback: http://www.bearwoodmusic.com/wp/xmlrpc.php

...if wordpress wasn't interfering somehow.  In fact... all those caching headers shouldn't exist either because FLIR sets its own caching headers.

Where do you have flir installed in your website directory?  Is it installed to the site root?  /path-to/your_www/www.yourwebsite/flir ?


Check out Facelift v2.0 beta 3.  The best version yet.

Offline

 

#6 2008-11-10 19:43:45

tzaddi
Steve
Registered: 2008-11-07
Posts: 8

Re: FLIR working inconsistently, and application octet-stream issue

Yeah, I have a folder in the root containing FLIR. Same with WordPress, then when it launches I'll hide the wp directory using htaccess.

So, I have
root/flir/ flir files
root/wp/ wordpress files

Offline

 

#7 2008-11-13 16:29:30

cory
Administrator
From: Detroit
Registered: 2008-08-05
Posts: 929
Website

Re: FLIR working inconsistently, and application octet-stream issue

That's very strange.  I don't know why it'd be trying to access anything in the WP directory.


Check out Facelift v2.0 beta 3.  The best version yet.

Offline

 

#8 2008-11-17 22:51:38

tzaddi
Steve
Registered: 2008-11-07
Posts: 8

Re: FLIR working inconsistently, and application octet-stream issue

I finally got back to this. Backtracked, installed the WP plugin for FLIR instead of doing it manually in case I was messing things up :-)

The pop up still appears from time to time in FF3 (PC) and IE6.

I'm still getting those caching headers, but with a 1984 expiry instead of 1981. I removed the line with pingback_url from my header.php and WP appears to insert the pingback line in the header no matter what. No idea where that date is coming from... WP post dates are correct so the system seems to know the time.

If all else fails, is there a way to disable the plugin by browser? Something I could do in a browser-sniff or conditional comment for IE?

Thanks for all your help. Much appreciated!

Offline

 

#9 2008-11-19 18:45:26

cory
Administrator
From: Detroit
Registered: 2008-08-05
Posts: 929
Website

Re: FLIR working inconsistently, and application octet-stream issue

WP is a very strange application IMO... 

You can read how to disable flir for IE6 and if you want to disable for IE in general you could change FLIR.isCraptastic to FLIR.isIE.


Check out Facelift v2.0 beta 3.  The best version yet.

Offline

 

#10 2009-02-07 20:08:25

jimisaacs
Smurf
From: New York
Registered: 2009-02-07
Posts: 1
Website

Re: FLIR working inconsistently, and application octet-stream issue

I've had these same issues in all browsers on all systems.
Not only with my FLIR installs but on the FLIR site itself.
http://facelift.mawhorter.net/

Your site's header sometimes doesn't replace correctly on my Mac with Safari and FF.

But my sites are having these crazy issues with both Mac and PC on IE7, FF, and Safari.

What was the difference?
I thought for a while and I came to a conclusion.
The servers.

I think it is a conflict with the resource URI for each FLIR image.
It is the long GET request attached to the generate.php resource.
It may have correct headers within the php, but that doesn't mean a browser will cache it, because Apache's default is to not cache requested php files.
So some of us might or might not have control over this setting within Apache's config.
Although PHP is supposed to override this, us PHP developers are at the mercy of PHP, Browsers, and Apache.

That being said, I think trying to use a more standard approach might be the answer.
I changed the condition in the generate.php file from calling the output function to simply a php header redirect to the cache file itself.

This changed some things, by the fact that some images were being cached, and others were not.
Sometimes the images cached were suddenly not cached.
So I continued thinking...

I think a server side redirect is a step in the right direction, but isn't enough here because an Apache server still may not cache the image if it is redirected to from a server side page (again based on Apache's cache settings combined with Browser behavior)

So I stopped there, I think somehow the javascript should do the cache redirect before ever getting to the generate.php.

I am not a javascript master, so I am not even sure if this can be done.
I'm not sure if it is possible to keep the javascript down to a minimum of 1 request, while still checking for the cache file. Maybe this doesn't matter as long as a Site's administrator makes sure he/she caches all the images before putting the site live. So he/she might go through multiple javascript requests to get an image saved, but the users of the site will still only make one request for the image already cached, and the administrator can rest assured that FLIR is simply calling the cached images. Browsers should cache fine, and users should see a speed increase on refresh.

There might also be a more simple solution to use mod_rewrite to fool the browser (with Apache) that it is looking for an image rather than a php file. Maybe then the browser will cache fine, but I haven't tried this yet...

Thoughts?

EDIT:
I take back what I said about changing to a server side redirect not caching correctly.
I checked, and checked again, and after a while I noticed that all my images were being cached by the browser, it just took a couple of tries. This was because changing to a server redirect created a new bug. Sometimes images are simply not found. This is remedied by a browser refresh, and it doesn't happen again until I clear the browser's cache.
What I've noticed is that this new 'not found' error is in place of all the weird things that were happening previously with the images not being rendered correctly, and never being cached by the browser.

Last edited by jimisaacs (2009-02-07 20:46:39)

Offline

 

#11 2009-02-09 23:34:25

cory
Administrator
From: Detroit
Registered: 2008-08-05
Posts: 929
Website

Re: FLIR working inconsistently, and application octet-stream issue

Thanks for your heavy thought about this. 

FLIR cache works like this:

New user visits a brand new uncached image, it is generated.  They refresh the page, another request is probably made and a 304 not modified is returned.  You're right, this is unnecessary. 

I think by adding a cache-control to the output_file function the images would then get cached by the browser without causing an extra call to verify that it hasn't been modified.  This should stop a lot of unnecessary trips to the server.

Code:

header('Cache-Control', 'max-age=3600, public, must-revalidate');

That should tell the browser that the image will not be changed for at least 3600 seconds and to check back then.  I don't have time to check it right now.


Check out Facelift v2.0 beta 3.  The best version yet.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB