Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:19+00:00 2026-05-26T23:23:19+00:00

I am using the h:outputScript-tag to add javascript-files to the page. The problem I

  • 0

I am using the h:outputScript-tag to add javascript-files to the page.
The problem I am facing is that the browser is caching the js-files. Usually I would add a parameter to the url of the script-tag, but this doesn’t work with h:outputScript.

Is there a way to pass a parameter to the h:outputScript-tag to prevent caching? I don’t want to prevent caching for the whole page, but only for certain elements.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:23:19+00:00Added an answer on May 26, 2026 at 11:23 pm

    This is a browser-specific problem. Most modern browsers will allow you to disable caching for the sake of testing, however there’s no way to disable caching to all users who use your web application. My advice would be to move the script onto the physical page (add script inside h:outputScript tag and remove name attribute). This allows you to potentially create dynamic javascript code and therefore means it must be loaded alongside the page itself each and every time.

    However I would only recommend this if there were no other solutions available. Most times a seemingly impossible obstacle can be easily overcome with a little outside-the-box thinking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
I'm trying to run some basic javascript code with JSF 2. I'm using the
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
I'm facing some problems using CDATA blocks inside h:outputscripts with MyFaces 2.0... but I
Using report builder 3.0, I have a report that queries a cube. How do
Using Entity Framework CodeFirst, how do I create a created datetime column that gets
I have a question about integrating jquery library with JSF 2.0 when using <h:outputScript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.