Click here to Skip to main content
15,741,818 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have to display an image,which is in base64 string format. It's working fine in ie9,chrome and mozilla.But when using ie8 image is not completly displaying.
Posted
Comments
DamithSL 21-Apr-14 6:12am    
please update your question with related code by click on improve question link

1 solution

You cannot fix IE8, right? :-)

Then you have two ways:
  1. Fix your code the way supporting wider set of browser. If your implementation of the embedded base64 image is not incorrectly implemented (I have no idea how it could be incorrect as I cannot see your code), fix it. If it cannot be done, opt for the regular image file.
  2. Reject some browsers you don't want to support. Say, if you detect that the browser is IE8, show a message recommending to upgrade this browser or use other browsers. You can find nice implementation of rejection, for example, here:
    http://jreject.turnwheel.com[^].


If you want to use approach #1, you may dislike the idea of a separate image file because you might be concerned with image hotlinking:
http://en.wikipedia.org/wiki/Inline_linking[^].

This would be a separate problem which has different solutions. For example, it can be done using ".htaccess" file or dynamic generation of the image content in HTTP response using one or another server-side technology. As I have no idea on what you have on server side, try to find the solution yourself, or ask some further question providing more information on your resources. Please see: http://bit.ly/1nk2tCA[^].

—SA
 
Share this answer
 
Comments
Dave Kreskowiak 21-Apr-14 11:37am    
IE8 has a 32K limit on data URIs. That's why it works in other wbrowsers but not IE8.
Sergey Alexandrovich Kryukov 21-Apr-14 11:38am    
Yes, it could be the reason; thank you very much.
Anyway, all the alternatives I explained can work out...
—SA
Dave Kreskowiak 21-Apr-14 11:41am    
Yes they can. IE8 is becoming the new IE6. ;)
Sergey Alexandrovich Kryukov 21-Apr-14 14:36pm    
:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900