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 8178543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:47:31+00:00 2026-06-06T23:47:31+00:00

I’ve look at this question and I must say that it does not fit

  • 0

I’ve look at this question and I must say that it does not fit my current problem(s) / interrogation.

Scenario:

After the user successfully login (via an Ajax call) they are redirected (document.location.href) to /app where the basic HTML is sent along with CSS and JS file.

Problems:

I’m currently putting the version number on my minified javascript and css filenames like appname-2.3.3.js and added a querystring version number to make sure it gets refreshed on new version ex:

<script src="/js/app/appname-2.3.3-min.js?1207040740" language="javascript" type="text/javascript"></script>

When I push a new version, after a new login, even if the filename and the querystring numbers changes, the browser keep the last version cached. The user need to do a full page refresh CTRL+F5 to get the new static files.

Question:

a) What would be the best way of ensuring each new login user has the right version? My guess is that the /app HTML page is cache and maybe I would need to put a querystring value there when redirecting after the login. But that brings me to the problem that the javascript file that call the login method would have to be the “right” version etc, etc.

Should I indicate an HTTP header in my controller to tell the browser not to cache the /app page? Would that have the implication of having no static file cached from that page?

There is new update almost every week or so, caching is still required.

b) From your point of view, what would be a good user-experience way of alerting already logged-in user that a new version has been updated and that they should refresh their page. Is it something that is “acceptable” from a user’s perceptive.

For reference, the app is built on ASP.NET MVC 3.

Thanks for your time / input

  • 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-06-06T23:47:33+00:00Added an answer on June 6, 2026 at 11:47 pm

    You can use window.applicationCache to do this. Most people think of Application Cache from the opposite side of the problem: How can I cache data on the client? But when the cache manifest file changes, it updates all the files in the CACHE section, completely ignoring any server caching. You’ll also get the benefit of client-side caching.

    This eliminates the need for version numbers and query strings to try to convince your browser to refresh.

    Add manifest="cache.manifest" to <html>. cache.manifest is the name of the file you’ll use to define what to cache. It can be named anything, but I actually call mine cache.manifest.

    <html lang="en" manifest="cache.manifest">
    

    Then make sure your web server has the MIME type for .manifest set to:

    text/cache-manifest

    Then create a file named cache.manifest, put it in your app root. Under the CACHE section, put the files you want cached (or in this case, refreshed). Under the NETWORK section put any files you don’t want cached, or simply * for “everything else”.

    Every time you push a release, change the version number in your cache manifest. Any change in the file will work, but the version number is a perfect mechanism for this.

    CACHE MANIFEST
    #ver 1.0.0
    
    CACHE:
    app.html
    app.css
    app.js
    
    NETWORK:
    *
    

    Then put this at the top of your script inside your onload or equivalent. Note that when you first add this to your code, the refresh won’t happen on the first update (since this function isn’t available), but on the second. After the initial update, it will work as expected.

    function updateVersion( event ) {
    
        window.applicationCache.removeEventListener( 'updateready', updateVersion, false );
    
        if ( window.applicationCache.status == window.applicationCache.UPDATEREADY ) {
            //perhaps notify user here
            window.applicationCache.swapCache();
            window.location.reload();
        };
    
    };
    
    if ( window.applicationCache ) { 
        window.applicationCache.addEventListener( 'updateready', updateVersion, false ); 
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

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.