PDFs Opening in the Browser? Here’s What Fixed It for Us

We recently had a client run into a bit of a strange issue with PDFs stored in SharePoint. Whenever they clicked on a PDF in a document library, instead of opening in the usual PDF viewer, it would behave as if it were opening directly in the browser – not what they were expecting. Oddly enough, when they clicked the three-dot menu (the ellipsis) and chose “Open in browser” or “Open in app”, everything worked just fine.

The Fix

After a bit of digging, what actually resolved the issue was turning off a setting in the document library:
“Allow people to access this document library in the browser without an internet connection.”

Once we disabled that setting, it didn’t fix the issue immediately – but after waiting for about an hour, things started working normally again.

Why This Might Happen

We can’t say for certain what was going on behind the scenes, but our theory is that it has something to do with how the browser and SharePoint handle offline caching. When the “access without an internet connection” option is enabled, it likely kicks in some additional JavaScript or service worker behaviour to manage offline functionality. That might interfere with how certain file types – like PDFs – are handled by default.

So if you’re seeing odd behaviour with file types in SharePoint, particularly around how they open, it’s worth checking if that offline access option is enabled. Disabling it could help clear things up – just don’t forget to give it some time to take effect.