Jump to content

Images SOMETIMES Load In FireFox


axiom82

Recommended Posts

Firefox issue ONLY.

 

1. I have a website where images load 90% of the time.  It's that 1 out of every 10 times the page loads and one image decides it doesn't feel like showing up.

 

2. If I rollover the image, it shows up magically.  If I view the image directly from the address bar, it never fails to load.

 

3. I have cleared my cache and started a new browser session to find the same problem continues to happen.

 

4. Most of my images are PNG, some GIF and JPG.

 

You can test this issue live on my website: celebrityhappening dot com.  Please help me find the issue :)  Oh and please join!  We are live and building a reeeeaaally cool community! :)

Link to comment
Share on other sites

Its probably because you are using images way bigger than the container they fit in, and shrinking them down with html. This looks to be causing timeouts. Resize the images to their display size, then re-upload them to the server.

Link to comment
Share on other sites

That is a valid point.  Either way, it's a performance increase - even if it is offset by excessive file storage.

 

I've noticed that if I add a random hash generated by md5 or sha1 and append it the the image src...the images load no matter what because the name is unique.

 

You see, I store my images as image source code in a MySQL MEDIUMBLOB field.  I have a script called image-viewer.php (e.g. image-viewer.php?member-id=123) that retrieves the image source from the database, echoes the image source, and sets http headers that turn the source back into a working image again.  It's very convenient for member profile images because there is no need to set file permissions, file names, storage folders, etc.  I just insert it as a field in a member record and pull it as needed.  When I append the hash string on the image url it fixes the issue (e.g. image-viewer.php?member-id=123&hash=0cc175b9c0f1b6a831c399e269772661).

 

Do you think using this technique is causing the problem?

 

Link to comment
Share on other sites

I can't say for sure - that's more of a database question than an HTML question, and I'm only an amateur when it comes to databases. But, it's very possible that if your database serves up the images slowly or something, the browser times them out.

 

I'm not sure how well databases deal with blobbed image files - it seems like quite a large amount of data they would have to serve up, which could potentially increase loading time. But really, you would be better off asking in the relevant database section of the forum to get a proper answer.

Link to comment
Share on other sites

NEVER store images in a database. NEVER. No exceptions. That's what the server is for! Sorry if I sound stern. But that's what any database guru would tell you. Stay clear away from blobs.

 

I second this. If you have any success in getting a large number of users on your site, the database will become MASSIVE.

Link to comment
Share on other sites

NEVER store images in a database. NEVER. No exceptions. That's what the server is for! Sorry if I sound stern. But that's what any database guru would tell you. Stay clear away from blobs.

 

I second this. If you have any success in getting a large number of users on your site, the database will become MASSIVE.

 

I third that

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.