Answer the question
In order to leave comments, you need to log in
Is it acceptable to use base64+mod_gzip to transfer and display pictures from 1C to Bitrix?
1C uses the HTML description module, which stores embedded images in product descriptions as base64. Accordingly, then this info is transmitted to the side of the site on Bitrix, where base64 is already displayed in the browser.
Base64 increases the size of the image by about a third, and mod_gzip compresses the html code of the page back. The result is about an average of 1% overhead according to my experiments: a 100 KB picture turns into a 133 KB code, which will be compressed into 101 KB during transmission.
Is such a scheme acceptable, in your opinion? Are my assumptions correct?
My concern is:
1. Is there an error?)
2. The browser will not be able to cache such images?
PS. Rewriting the code for storing images in files and subsequent exchange with Bitrix is not economically justified.
Answer the question
In order to leave comments, you need to log in
If it works and the exchange is not every 5 seconds, then why not?
The information in the goods, especially the images, change extremely rarely and there is not much point in saving KB.
I won’t say for sure about caching, but I myself used this technique for storing small images in CSS for a long time, I know that many people did this. But how he is now - I will not tell you anymore :)
1. Is there an error?)
2. The browser will not be able to cache such pictures?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question