Open craigryan opened 9 years ago
I've since tried as suggested here:
http://jhipster.github.io/development.html
under 'tips' with Chrome dev tools open I disable cache, tried reloading and also Reset All from BS console and still seeing the old cached versions.
@craigryan Can you try simply running window.location.reload(true)
in your browser console and see if that even works?
Shane, tried window.location.reload(true) and refreshes but with old content. Even stranger - Network -> Response when I choose the main.html loaded shows the new content though the old is still displayed. Disable cache is definitely checked.
Checked Console finally, a few errors:
Opening Web Socket... sockjs.js:1213 WebSocket connection to 'ws://localhost:3000/websocket/tracker/306/z22jhepa/websocket' failed: Connection closed before receiving a handshake response sockjs.js:807 POST http://localhost:3000/websocket/tracker/306/e3klf5ma/xhr_streaming 403 (Forbidden)AbstractXHRObject._start @ sockjs.js:807(anonymous function) @ sockjs.js:834 sockjs.js:807 POST http://localhost:3000/websocket/tracker/306/fqcvjeat/xhr 403 (Forbidden)AbstractXHRObject._start @ sockjs.js:807(anonymous function) @ sockjs.js:834 stomp.min.js:8 Whoops! Lost connection to undefined
I can access the BrowserSync console (3001) for my vanilla jhipster running app.. i.e without alteration to gruntfile etc. I'm viewing the app on 3000. I then tried to make a few content changes to the original index.html and main.html just to see the browser update behaviour. The BS console shows activity, and the chrome tab for my app refreshed.
As the page partially loads I see the new text (eg changed 'this is your footer' to 'this is your footer, dude'). I briefly see the new footer text but then the pages fully refreshes with the old page content.
Tried C-F5, opening the app incognito, directly on 8080 etc - same result. Is this a simple fix? Some browser cache setup I need to apply? Would really appreciate some pointers, I'm hoping you guys are familiar with jhipster. Github won't allow attached gruntfile as a .txt so here it is:
// Generated on 2015-09-27 using generator-jhipster 2.19.0 'use strict'; var fs = require('fs');
var parseString = require('xml2js').parseString; // Returns the second occurence of the version number var parseVersionFromPomXml = function() { var version; var pomXml = fs.readFileSync('pom.xml', "utf8"); parseString(pomXml, function (err, result){ version = result.project.version[0]; }); return version; };
// usemin custom step var useminAutoprefixer = { name: 'autoprefixer', createConfig: function(context, block) { if(block.src.length === 0) { return {}; } else { return require('grunt-usemin/lib/config/cssmin').createConfig(context, block) // Reuse cssmins createConfig } } };
module.exports = function (grunt) { require('load-grunt-tasks')(grunt); require('time-grunt')(grunt);
};