Solved

Possible to require browser to retrieve fresh copy of page?

Posted on 2011-02-14
6
231 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 26

Accepted Solution

by:
Shaun Kline earned 167 total points
ID: 34887478
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
ID: 34887499
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
ID: 34887507
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:jdana
ID: 34897176
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
ID: 34898981
Easy.. Dev, test, fix, test (Loop until satisfied).

Then publish.
0
 

Author Closing Comment

by:jdana
ID: 35045986
Thanks!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

813 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

18 Experts available now in Live!

Get 1:1 Help Now