# Any way to prevent WebViewer from doing HEAD request?

**URL:** <https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147>\
**Category:** Technical Support\
**Created:** [November 3, 2021, 9:29pm UTC](https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147 "2021-11-03T21:29:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yrashk](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/yrashk/32/598_2.png) [@yrashk](https://pdfjs.community/u/yrashk)\
**Post date:** [November 3, 2021, 9:29pm UTC](https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147/1 "2021-11-03T21:29:06Z")

</div>

**Which product are you using?**  
PDF.js Express Viewer

**PDF.js Express Version**

‘8.1.0’

**Detailed description of issue**

When loading document, the viewer tries to HEAD . This is problematic as URLs I give to it are pre-signed S3 URLs and they are _not_ authorizing for HEAD, just GET. Ultimately, WebViewer still works, but creates an exception in console, which might also lead to a minor slowdown.

**Expected behaviour**  
Have an option to disable HEAD

**Does your issue happen with every document, or just one?**

Every document

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [November 3, 2021, 9:29pm UTC](https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147/3 "2021-11-03T21:29:11Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Integrating PDF.js Express Viewer into a new Blazor project - Troubleshooting](https://pdfjs.express/documentation/get-started-viewer/blazor/new-project#troubleshooting)
- [Samples](https://pdfjs.express/documentation/viewer/samples)
- [Core engine for WebViewer - Creating your own UI using WebViewer Core](https://pdfjs.express/documentation/ui-customization/core.8#creating-your-own-ui-using-webviewer-core)

APIs:
- [Core.Document - isWebViewerServerDocument()](https://pdfjs.express/api/Core.Document.html#isWebViewerServerDocument__anchor)
- [UndefinedWebViewer(options, viewerElement)](https://pdfjs.express/api/global.html#WebViewer__anchor)
- [UI - setCustomModal(options)](https://pdfjs.express/api/UI.html#.setCustomModal__anchor)

Forums:
- [Pdf js viewer throwing error on Firefox](https://pdfjs.community/t/pdf-js-viewer-throwing-error-on-firefox/429/1)
- [CORS issue correspondence](https://pdfjs.community/t/cors-issue-correspondence/878/1)
- [WebViewer not getting loaded in IE 11](https://pdfjs.community/t/webviewer-not-getting-loaded-in-ie-11/367/5)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [November 4, 2021, 2:21pm UTC](https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147/4 "2021-11-04T14:21:56Z")

</div>

Hey there!

Right now we do not have an API to disable this. A HEAD request is made to attempt to get the file type and size before loading it.

However we should be able to add an API to disable this. I’ll add it to our backlog and see what we can do.

Thanks for the feedback,  
Logan

---

<div class="post-metadata">

**Author:** ![stherrien](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@stherrien](https://pdfjs.community/u/stherrien)\
**Post date:** [August 4, 2022, 2:56pm UTC](https://pdfjs.community/t/any-way-to-prevent-webviewer-from-doing-head-request/1147/5 "2022-08-04T14:56:08Z")

</div>

I too have this issue and I’m unable to upgrade until there is a workaround. version 8.7.0
