Solved

Possible to require browser to retrieve fresh copy of page?

Posted on 2011-02-14
6
236 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
[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
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
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…

734 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