I have a web site, use ngflow to upload my files, ngflow use HTML5 fileapi, if a file is big, it slite chunks.
I use CefSharp browes my site, but chrome in CefSharp is old version of 25, if the file size is larger than the chunk size (size of each slice), the Content-Length in XHR header will still be the unsliced file size, not the chunk size. Who can help me?
Related
I've got this web app where the favicon is inlined in the HTML, e.g.,
<link rel="icon" href="data:image/x-icon;base64,A VERY VERY LONG STRING...">
However I can definitely see that both Chrome and Firefox (latest version as of this date) issue a request to favicon.ico at the root of my website anyway, e.g. http://example.com/favicon.ico
In case it matters:
The base64-encoded string embedded in the href attribute is quite big.
The favicon <link> tag is managed by react-helmet
The website itself isn't particularly slow. (Consistent good Apdex score throughout.)
I can only assume that the developers at the time (all gone now) wanted to inline the favicon to avoid an HTTP request and therefore wrote some "infrastructure" to support that: namely using a Webpack plugin to automatically base64 encode all assets imported as JavaScript modules (e.g. import favicon from './assets/favicon.ico').
Clearly this isn't working as it was intended but what strikes me the most is that the actual base64 string weights more than the favicon.ico file itself (20k vs 15k). So I'm not sure where the benefit is (if any).
While I don't know any better than you why the original developers designed it that way, it makes sense for offline file rendering of a simple all-in-one html file.
I actually just looked this up, because I am building a SUPER small all-in-one html file. I don't have to include an extra file if it's base 64 encoded into the single html file.
Here's my last two days of reading in few a minute.
As of 2021, 93% of online browsers could view a SVG as an Favicon
https://en.wikipedia.org/wiki/Usage_share_of_web_browsers
https://caniuse.com/link-icon-svg
.ICO is outdated way to create 'favicons' and requires you to make multiple small sizes of your image whereas .PNG can scale down from any size. It's easily the best lazy option for a quick icon. Because the viewing size of Icons are so small, any complex picture is undistinguishable. Making very simple designs optimal.
This is where .SVG shines.
https://www.iconfinder.com/
find image > inspect > open in new page > save image as
Paint 3D's Magic Select is free tool worth mentioning
This is by far the most informative and straight forward video on auto SVG
https://www.youtube.com/watch?v=10m_2bPXa1s
Now, we're left with a 4-8KBs of data. Which could be a 5th of your .PNGs size.
Next we'll want to optimize it
https://www.youtube.com/watch?v=iVzW3XuOm7E
So we could skip a DOM request by having all the data in the head but that leads us here.
https://css-tricks.com/probably-dont-base64-svg/
Now say we're creating a Single Page Application and care about SEO. Not only do we score higher and reduce our load times but we offer a better experience for users with the lowest internet speeds.
Today I have found that PDF/A files generated by mpdf are very huge (I am using some CJK fonts), possibly due to inclusion of the complete glyphs. However, those created by commercial pdf applications (e.g. Adobe Acrobat, FoxIt, etc.) do embed subsets of the glyphs (for characters actually used in a document), even though the PDF/A option is enabled. Why does mpdf embed whole glyphs when the PDFA parameter is enabled?
Am working on Work Execution app. How to compress the image size before saving the attachment since the attachment size limited to max 10MB.
We have an iFix available that can be requested that will shrink this filesize of the default attachment on iOS. Please open a PMR.
Is there a way to embed a font to the xls and use it with PHPExcel?
I want custom font because I want to use barcode font in the excel.
I tried to embed a barcode image but random dot appears when printing and the barcode scanner cannot read it.
There isn't. Excel relies on the range of fonts that exist on the client PC where the Excel document is opened. Where a font doesn't exist, it will fall back to members of the font family that exist on that client PC. In the case of a font referenced in an xls file where no member of that font family exists on the client PC, it simply cannot be rendered. This is standard MS Excel behaviour, not specific to PHPExcel-generated files.
The only alternative I can suggest is generating an image file of the barcode, and embedding that image in the xls file.
This is the first time I've used #font-face. The font pack is from myfonts.com and I'm currently testing in Safari and noticed through the web inspector that the css file, which loads the 2 fonts shows as a nearly-2mb-download ! the fonts appear to be there as base64 encoded. The pack didn't include the actual .otf files.
I've added Gzipping via a .htaccess file and this has cut down the size of that file by nearly half but at 1mb, it's still not acceptable and I can't understand why it's so big.
Base64 is larger than the original file around 1.3 - from wikipedia. You can convert the file back to its original state with this convertor, but there are a lot of tool on the net.
Either download the font files through myfonts.com ( http://new.myfonts.com/fonts/typodermic/great-escape-rg/ )
or use font-squirrel generator to make them from the original files if you have previously purchased them
( http://www.fontsquirrel.com/fontface/generator )