Q: I encountered the warning "Your server has not been configured to serve .gz and .br files with the expected Content-Encoding. See http://www.pdftron.com/kb_content_encoding for instructions on how to resolve this." when running WebViewer on my server. What does this mean and how do I fix this?A: WebViewer contains certain large files that are already compressed using brotli (abbreviated br) or gzip encoding. As the warning suggests for ideal performance your server should be adjusted to serve these files with the HTTP Content-Encoding header. (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for more details on Content-Encoding) The main reason for this is that with this header the browser can quickly decompress these files using native code. Note that WebViewer can still function by decompressing these files in JavaScript, but this may have an impact on loading speed.General Steps1. Note that in order to serve files with Content-Encoding: br your site must use HTTPS rather than HTTP. This is due to behaviour in certain browsers (in particular Chrome) that leads them to reject brotli encoding served over HTTP.2. The goal is to serve files within WebViewer containing ".gz." in their file name with "Content-Encoding: gzip" and files containing ".br." in their file name with "Content-Encoding: br".Specific Instructions:
For Apache servers: WebViewer includes an .htaccess file (under WebViewer/lib/html5) to implement this logic, so in most cases the only necessary step is to enable the mod_headers module. Note that this will only work if .htaccess is enabled for your particular server.
Good question. Here are some steps to get you set up:1. If the url rewrite module is not available/installed you can install it from https://www.iis.net/downloads/microsoft/url-rewrite.
2. Put the attached web.config file in the WebVIewer/lib/html5 folder.
I tested on IIS 10, though this should work on IIS 7 and above. (web.config is only supported on IIS 7+)David TippettSenior Software DeveloperPDFTron Systems Inc.
On Monday, June 4, 2018 at 9:54:05 AM UTC-7, (unknown) wrote:
What are the instructions for how to configure this on IIS servers?Thank you
--
You received this message because you are subscribed to a topic in the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pdfnet-webviewer/SeVvEpPAELg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pdfnet-webviewer+unsubscribe@googlegroups.com.
To post to this group, send email to pdfnet-webviewer@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.
For more options, visit https://groups.google.com/d/optout.
If I place the web.config where you describe the rewrite rules do not get loaded, and the same message displays re "Your server has not been configured etc"If I add the rewrite rules to the application root web.config, there is an Internal Server Error with the following message in the console:I am running ASP.NET MVC app with routing rules, I am thinking this may have something to do with why the web.config cannot be found in the html5 directory. However can the rules be rewritten such that they can be placed in the root web.config without interfering with WebViewer.js?Thank you.
On Mon, Jun 4, 2018 at 4:44 PM, David Tippett via PDFTron WebViewer <pdfnet-webviewer+APn2wQdMpuPo7bEZ1iEgFMter3AEQTw-IvfVxlrweW-kgPA@googlegroups.com> wrote:
Good question. Here are some steps to get you set up:1. If the url rewrite module is not available/installed you can install it from https://www.iis.net/downloads/microsoft/url-rewrite.2. Put the attached web.config file in the WebVIewer/lib/html5 folder.I tested on IIS 10, though this should work on IIS 7 and above. (web.config is only supported on IIS 7+)David TippettSenior Software DeveloperPDFTron Systems Inc.
On Monday, June 4, 2018 at 9:54:05 AM UTC-7, (unknown) wrote:What are the instructions for how to configure this on IIS servers?Thank you
On Tuesday, December 12, 2017 at 5:33:00 PM UTC-5, David Tippett wrote:Q: I encountered the warning "Your server has not been configured to serve .gz and .br files with the expected Content-Encoding. See http://www.pdftron.com/kb_content_encoding for instructions on how to resolve this." when running WebViewer on my server. What does this mean and how do I fix this?A: WebViewer contains certain large files that are already compressed using brotli (abbreviated br) or gzip encoding. As the warning suggests for ideal performance your server should be adjusted to serve these files with the HTTP Content-Encoding header. (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for more details on Content-Encoding) The main reason for this is that with this header the browser can quickly decompress these files using native code. Note that WebViewer can still function by decompressing these files in JavaScript, but this may have an impact on loading speed.General Steps1. Note that in order to serve files with Content-Encoding: br your site must use HTTPS rather than HTTP. This is due to behaviour in certain browsers (in particular Chrome) that leads them to reject brotli encoding served over HTTP.2. The goal is to serve files within WebViewer containing ".gz." in their file name with "Content-Encoding: gzip" and files containing ".br." in their file name with "Content-Encoding: br".Specific Instructions:For Apache servers: WebViewer includes an .htaccess file (under WebViewer/lib/html5) to implement this logic, so in most cases the only necessary step is to enable the mod_headers module. Note that this will only work if .htaccess is enabled for your particular server.For S3: Using a tool such as Cloudberry (S3 browser should also have similar functionality) you can directly set the Content-Encoding of a particular file by clicking other mouse button on the file to pop up the context menu -> Set HTTP headers -> Enter Content-Encoding and either gzip or br depending on the file. S3 also provides scripting APIs that can accomplish the same result when uploading if this needs to be done frequently.
--
You received this message because you are subscribed to a topic in the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pdfnet-webviewer/SeVvEpPAELg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pdfnet-webview...@googlegroups.com.
To post to this group, send email to pdfnet-w...@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.
For more options, visit https://groups.google.com/d/optout.
Q: I encountered the warning "Your server has not been configured to serve .gz and .br files with the expected Content-Encoding. See http://www.pdftron.com/kb_content_encoding for instructions on how to resolve this." when running WebViewer on my server. What does this mean and how do I fix this?A: WebViewer contains certain large files that are already compressed using brotli (abbreviated br) or gzip encoding. As the warning suggests for ideal performance your server should be adjusted to serve these files with the HTTP Content-Encoding header. (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding for more details on Content-Encoding) The main reason for this is that with this header the browser can quickly decompress these files using native code. Note that WebViewer can still function by decompressing these files in JavaScript, but this may have an impact on loading speed.General Steps1. Note that in order to serve files with Content-Encoding: br your site must use HTTPS rather than HTTP. This is due to behaviour in certain browsers (in particular Chrome) that leads them to reject brotli encoding served over HTTP.2. The goal is to serve files within WebViewer containing ".gz." in their file name with "Content-Encoding: gzip" and files containing ".br." in their file name with "Content-Encoding: br".Specific Instructions:
For Apache servers: WebViewer includes an .htaccess file (under WebViewer/lib/html5) to implement this logic, so in most cases the only necessary step is to enable the mod_headers module. Note that this will only work if .htaccess is enabled for your particular server.