Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans: Code changes to javascript & css files are not reflected in browser after saving

Tags:

netbeans

This is driving me crazy. I'm developing an app in the NetBeans IDE in PHP, using the CodeIgnitor framework. I am making code changes to js and css files in NetBeans, saving them but the files the browser is loading do not contain the code changes. When I open the files directly outside of NetBeans, the saved changes aren't there.

I'm storing the javascript & css files in a folder called static, which is outside of the 'application' directory in CodeIgnitor. What's weird is any code changes in PHP files work fine. I'm guessing NetBeans is saving the changes to the js/css files somewhere else but can't find them on my hard drive. This just started happening, it was working 'normally' before.

Thanks for the help.

Al

like image 292
Al F Avatar asked Feb 27 '23 14:02

Al F


2 Answers

I had the same problem, upon investigation, my browser cached my old style sheet that I had recently updated. Clearing the cache and refreshing showed my new styling, after around 20 minutes of frustration :D

like image 83
Jacob McKay Avatar answered Apr 29 '23 03:04

Jacob McKay


This problem occurs due to browser cache. For chrome while testing open the developer mode by pressing the F12 key and set cache disabled in the network tab as shown in Image below. It will ensure that you will always get updated version of the page files.

enter image description here

like image 28
Akshay Pethani Avatar answered Apr 29 '23 02:04

Akshay Pethani