Stopping 404's. FB not finding its own files.

Page: 1

Author Post
Registered: May 2011
Posts: 17
I have floatbox 7.41 install in this home directory /floatbox-741

FB seems to work like it has for years. Recently I start monitoring my 404 errors that I normally ignore.

I load up floatbox in the usual fashion inside my pages:
<link rel="stylesheet" type="text/css" href="/floatbox-741/floatbox.css" />
<script type="text/javascript" src="/floatbox-741/floatbox.js"></script>

But apparently for some visitors, it's as though floatbox.js is trying to fetch its fbOptions.js and core_741.js files from either the URI's base directory or the root directory. But floatbox is in neither place. They're in my /floatbox-741/ base directory.

I don't get these 404's from 99% of my visitors, otherwise I would be inundated with these 404's in my logs:


Three browsers I've seen do this are:

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Browser: Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1

Therefor, floatbox.js is somehow is forgetting to pull it's options from it's base directory.

Registered: Aug 2008
Posts: 3382
Well, you're the official 404 guy now.

I think it has to be something around your server configuration. Yours were the only reports of language file 404s for a small subset of your visitors under the previous version. And now similar but different 404s, and again only for a small subset of your visitors, and so far only on your site.

I don't think I can be of any help here, and I doubt the origin of the problem is in the Floatbox code. It would help if you could send me a link to one of your pages that you see the 404s occurring on and I could take a look for anything odd in the loading or configuration there. Send the link by email on this forum or the contact form on this site if you don't want to post it publicly in this thread.

I would start looking around for server configuration problems or odd cache problems. Also, if you're bootstrapping floatbox.js, try not doing that.
Registered: May 2011
Posts: 17
I'm the 404 guy - but I don't want to be!

For the entire month of May I only had 5 unique visitors trying to pull FB files from the relative subdirectory or from (most time) the root directory on differing pages. I don't think I'm bootstrapping floatbox.js - however you do that.

For giggles, and I bet you don't have time for this, could you trap for 404s on your server to send you an alert if a client is trying to fetch "core_741.js" from the root directory?

Ie., - sends you an alert

I notice you keep it here so no client should fetch from the root:

BTW, according to your docs, I'm going to do your same trick:
"(fbOptions.js can be manually appended to floatbox.js to elminate one network fetch is [SIC] so desired.)"

Just curious if it happens to you since you get a lot of floatbox demo visitors.
Registered: Aug 2008
Posts: 3382
No relevant 404s in my logs for the last few days, just as there were none for the language files when that problem was the topic of the day. No attempts to fetch core_* from any untoward location.

I think it's you, not me. :-)

As an experimental workaround on your site, you could try appending core_741.js to floatbox.js and test it out. Sorry, I don't have time to test it right now, but I did try to code it so it can be one monolithic file. I'd put fbOptions.js first, floatbox.js second, and core third.

Page: 1