File Viewing Security: Google Docs Viewer vs Custom Solution

Hey everyone,

I’m working on an app where users upload files and view them later. We’re having some issues with our current setup. Right now, we change non-PDF files to PDF and show them in an iframe. But it’s super slow and users hate waiting.

We’re thinking about using Google Docs Viewer to speed things up. But we’re worried about security. Does anyone know if it’s safe? Will our files be public or show up in Google searches?

Also, has anyone used Google Docs Viewer before? How did it work out for you? Any other ideas for quick file viewing that keeps things private?

Thanks for any help!

hey oscar, i’ve used google docs viewer before. it’s pretty fast, but yeah, security can be iffy. have you thought about using something like pdf.js? it’s open-source and runs in the browser. might be slower than google, but def more secure. just my 2 cents!

I’ve been in your shoes, Oscar64. We faced similar challenges at my previous company. Google Docs Viewer is tempting, but it’s not without risks. While it’s faster, you’re essentially handing over your users’ files to a third party.

We ended up building our own viewer using PDF.js for PDFs and other libraries for common file types. It took more time initially, but gave us full control over security and performance. We also implemented server-side caching and progressive loading to speed things up.

Another option we considered was using a commercial document viewing API like DocuVieware or Accusoft. They offer better security than Google Docs Viewer and handle multiple file types. They’re not free, but could be a good middle ground if you don’t want to build everything from scratch.

Whatever route you choose, make sure to clearly communicate your file handling practices to users. Transparency goes a long way in building trust.

I’ve dealt with similar challenges in my projects. Google Docs Viewer can be a double-edged sword. It’s fast and handles various file types well, but there are privacy concerns. While files aren’t publicly indexed, they’re still processed on Google’s servers. For sensitive data, that’s a risk.

In my experience, a hybrid approach works best. Use Google Docs Viewer for non-sensitive files to improve speed. For confidential documents, invest in a custom solution or use specialized secure document viewers. It’s a balance between user experience and security.

Also, consider implementing client-side rendering for certain file types. It can significantly reduce server load and improve viewing speed without compromising security. It’s more work upfront but pays off in the long run.