Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Wildfly: Disabling bowser caching of static web pages

Posted on 2016-10-12
5
Medium Priority
?
220 Views
Last Modified: 2016-10-18
I have an AngularJS index.html page and am having a problem in Wilfly 8.1.0 that the page is being cached (it is in a war file).

I know that the old <meta http-equiv... header tags are highly unrelieable.

Is there a way to force Wildfly to server the default values of:

    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: 0

in the HTTP response header?
0
Comment
Question by:James Talvy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41840567
Cached - I am assuming you mean cached on the browser and not the server?

What role is Wildfly playing in this?

Can you describe the problem a bit more - you have an Angular page - which should not be affected by caching as it runs off the state of its model - which is not cached.
0
 
LVL 1

Accepted Solution

by:
James Talvy earned 0 total points
ID: 41840576
The index.html which contains the AngularJS refs is being cached by the browser.  You have to empty the cache or try Ctrl-Shift-Reload to force it.

I found this article to update the <filters> in the standalone.xml and will try it out:

https://gist.github.com/remibantos/5e86829e1ba6ad64eea1
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41840799
Firefox says that they cache everything.  If you click on 'Back', they use the cached version.  The anti-cache measures may affect when you are loading the page the first time.

What specific problem are you having?  Making pages work in spite of caching has become a 'normal' thing now on the web.
0
 
LVL 27

Expert Comment

by:BigRat
ID: 41841696
I don't know this thing in detail, having seen it once in action, but I presume there is nothing in the console (at http://<host>:9990/console)?

Personally I build my Angular Apps with Grunt and minify all the Javascript and HTML into files, which have automatically generated names from release to release. In this way it is irrelevant what the browser stores from release to release, but has the advantage of caching the "code" for a given release.
1
 
LVL 1

Author Closing Comment

by:James Talvy
ID: 41847984
None of the suggestions yielded anything diff that what I learned on my own.
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question