It seems that cache directives are not applied when the resource response contains HTTP header Content-Disposition:inline. When we use OmniFaces CacheControlFilter the response doesn't contain Cache-Control or Expires directive. Is it normal?
OmniFaces CacheControlFilter has no effect when response contains Content-Disposition header
242 views Asked by jpl At
1
There are 1 answers
Related Questions in JSF
- Calling custom AuthenticationHandler from Faces bean throws IllegalStateException: Cannot change buffer size after data has been written
- Force security constraint managed 403 error when hitting restricted page with h:commandLink
- primefaces component id not found in update
- LazyDataModel, custom filter with search button
- How to use SelectManyCheckbox with ArrayList as HashMap value
- how to surpress logging of jsf "There are some unhandled FacesMessages"
- SelectManyCheckbox returns array of Object[] instead of ArrayList
- My dialog component on PrimeFaces can't render a list on first click
- How to retrieve posted data via FacesContext
- I'm using JSF and after a timer expires, I want to display a warning
- Why print result is blank?
- PrimeFaces centering searchbar on menubar
- JSF: p:fileUpload requiredmessage is apearing on click of another button
- How can I make sure that JSF works?
- Is there an already-made template project using Spring, JSF, PrimeFaces, SOAP and MySQL?
Related Questions in CACHE-CONTROL
- Is it possible to force a browser to use the same cache entry for different paths?
- okhttp cache-control no-cache processing strategy
- Why does the browser force revalidation when serving an initial document request?
- Light speed working on private window(incognito) while not working in normal window of a browser
- Application slowness issue in Chrome
- souin cache, revalidating cached objects in the background while serving stale ones
- NGINX : Static resources missing. Server response code 304
- Flutter: How to extend the age of the cached image
- How do I add Cache-Control with no-cache and no-store header in Spring Boot?
- Nextjs cache and cloudflare cache are not synced with getStaticProps revalidation
- object metadata (cache control) being deleted whenever new version uploaded?
- How to Troubleshoot Resource Caching Issues in Chrome?
- How to stop Starlette from setting "Cache-Control: no-cache"?
- Unable to Override Cache Control response headers in ASP.net Web API using OwinMiddleware for signalr/negotiate signalr/start calls
- Expires headers and cach control headers on but page speed test showing cache policy error
Related Questions in OMNIFACES
- InputTextarea with maximum rows and columns
- Use Omnifaces in Pac4j during using AuthorizationGenerator
- how to pass attribute by value to backend bean
- How do suppress my PrimeFaces ajaxStatus when using OmniFaces socket and JSF core commandScript?
- Custom validator for a date inside a JSF iterable component (data table)
- How can I create a more fine grained web socket in JSF?
- Does JSF have a way to get the tag handlers in the current view?
- How can I piggyback request arguments from a web socket message without manually constructing array?
- ViewScoped bean being initialized multiple times with includeViewParams="true"
- Using OmniFaces in Spring Boot project
- Manifest cannot detected in Quarkus-Omnifaces Extension
- Gradle 8.0.2 - Unable to deploy Omnifaces 'showcase-master'
- Manually process `unload` event before triggering `preDestroy` method in OmniFaces ViewScoped bean
- @PreDestroy method not called when leaving page of bean annotated with OmniFaces "ViewScoped"
- How to invalidate views for the current session in JSF?
Related Questions in CONTENT-DISPOSITION
- JavaScript anchor file download - override file name from Content-Disposition header
- Content disposition usage in a React Applications
- How do I prevent Puppeteer from downloading files via requests with Content-Disposition: attachment?
- Simple proxy to change Content-Disposition header (AWS Preferred)
- Java Apache set additional parameters in "Content-Disposition:"
- Render PDF from byte[] with specific filename using blazor .net 8
- File gets downloaded with a wrong name when using 'Content-Disposition' value 'attachment; filename*=UTF''...'
- PHP Multiple Content-Disposition Same Name
- suggestedFilename in Playwright (docker) is not set correctly (default to "download")
- MultiPartFile is null when Content-Disposition does not contain filename attribute
- Content-Disposition header visible in preview but not actually available
- Even though content-disposition has proper file name , but local downloaded file has different name
- Content-Disposition inline not able to download PDF when open in chrome (asp.net)
- How to ignore `Content-disposition: attachement` header to embed a PDF in <object> element?
- Content-Disposition filename not being set correctly in Spring Boot 2.7.11
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
No, this is not the default behavior.
This behavior suggests that the code responsible for streaming the file has performed a
response.reset()in order to ensure that the response is crisp and clean. You see this often in copypaste code snippets because starters otherwise complain that the download doesn't work. For example here: How to provide a file download from a JSF backing bean?Given that you're using OmniFaces, you may probably find
Faces#sendFile()orFileServletmore useful for the task of streaming a file to response. TheFaces#sendFile()does not perform aresponse.reset(), and theFileServletcaches by default 30 days which is controllable by overriding thegetExpireTime()method.