Solved

Possible to require browser to retrieve fresh copy of page?

Posted on 2011-02-14
6
229 Views
Last Modified: 2012-05-11
I'm building my first truly complex ASP.NET / VB.NET / JavaScript / jQuery web form.  And, to be candid, I've had to work out a few bugs after going into production.  Fortunately, the form lives on an IIS server with a private IP, so it isn't too hard to fire off an email to my users saying, "I've updated the web form.  Please load the page and press F5."  Here's the kicker, many of them forget to press F5. Subsequently, my phone has been ringing a lot.  Is there a way to configure the web form that tells my user's browsers (mostly IE 8 and Firefox 3.5 and 3.6) to grab fresh copies of the HTML, CSS, and JS files every single time the page loads?  If there is, I'd turn this feature on for a period of a week or so, then turn it off after I work out the bugs.
0
Comment
Question by:jdana
6 Comments
 
LVL 25

Accepted Solution

by:
Shaun Kline earned 167 total points
Comment Utility
In IIS, you can change how pages are cached by the client. In the properties for your website, go to the HTTP Headers tab and enable content expiration. The proper setting would be "Expire immediately".
0
 
LVL 7

Assisted Solution

by:mkobrin
mkobrin earned 167 total points
Comment Utility
You can also prevent caching by adding the following in the heading:

<meta http-equiv="pragma" content="no-cache" />

but that will reload this page every time.

Will still require a refresh from the clients side once after the change is uploaded.

When you are fined testing you can remove the line and the next time the user load the page it will cache again
0
 
LVL 15

Assisted Solution

by:mattisflones
mattisflones earned 166 total points
Comment Utility
IIS, Site, HTTP Headers, "Enable content expiration"->"Expire immediately".
That combined with a timer that triggers a update should do the trick..


But, my real answer is: Dont dev that way! Its bad!


0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:jdana
Comment Utility
mattisflones,

You stated, "But, my real answer is: Dont dev that way! Its bad!"  Okay, sounds reasonable, what would you suggest as an alternative?

J
0
 
LVL 15

Expert Comment

by:mattisflones
Comment Utility
Easy.. Dev, test, fix, test (Loop until satisfied).

Then publish.
0
 

Author Closing Comment

by:jdana
Comment Utility
Thanks!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now