Please see the below image.. note the timestamps -- my computer does not like this activity. This problem seems to happen whenever I have any *.js or *.cshtml file open.
I have turned off "Download remote references (e.g. http://) for files in the miscellaneous files project" in JavaScript -> IntelliSense -> General, but the problem continues.
I also tried moving the inclusion of "doorbell.io.js" into a bundle rather than the _Layout.cshtml file, but that didn't work.
How can I prevent VS from downloading this JavaScript reference?
To fix the immediate issue
Remove the offending line from "_references.js". Save. The problem should stop immediately.
/// <reference path="doorbell.io.js" />
Future considerations...
Note that by default references are set to auto-sync. This means that if you ever refresh your sources, such as from nuget or by adding a javascript file manually, the offending file could be added back in. You can disable this functionality by right-clicking inside the file and unselecting Auto-sync JavaScript References
If you decide to disable this feature, you can still manually update them with the Update JavaScript References menu item.
Note that at this point in time there is no easy way to prevent a specific file from re-appearing on this list. You will need to remove it manually every time Visual Studio generates this list on your behalf.
Firebase Auth Does the Same Thing
I had a hard time solving this for my application when I switched from 2013 to 2015.
I'm using firebase/angular and any file that referenced my Auth service caused this loop. What ended up solving it was adding this registry item as a DWORD with a value of 0: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\JavaScriptLanguageService\MaximumScriptLoaderReferencesToLoad
All credit goes to Michael Braude with Firebase from this SO: Here
Related
I'm using Liferay CMS as part of my Uni course in full stack development and, as a final project, I have to use the d3.js library to display some graphs. I'm struggling to clear the browser cache though, and that makes the developing process very tedious and time consuming: I'd like to see my front-end changes right away without having to fiddle with the browser cache, especially because, as I'm working with svg elements, it sometimes gets tricky to line up stuff and so on. Sometimes clearing the cache works, sometimes it doesn't, as well as opening a new private window, but there must be a conclusive and foolproof method to delete all cached elements. Does somebody know how to do that?
Liferay has a "Developer Mode" which should bypass quite a lot of caching anyway. In your portal-ext.properties (typically in ${liferay.home}, just add the line
include-and-override=portal-developer.properties
to activate this mode.
It will also skip minifiers and concatenation of all of the different resources that you're loading.
This doesn't clear caches but will solve your updating problem.
In the HTML, add an (unused) query string to the html link to linked files and alter it each time you make an update to the file. e.g. for css:
<link rel="stylesheet" href="styles.css?a">
Then, each time you make changes to the file pointed to, change the 'a' to 'b' or anything (Don't change the linked file's name, the query string will be ignored).
This forces the browser to 'change' the linked file each time the href changes and so the altered file gets reloaded.
The method will work for script and other linked files. The query string could be something meaningful such as version numbers - ?v1, but anything will do.
Edit, as noted by #GerardoFurtado, a further discussion of this idea is available here Cache busting via params
I create an excel web add-in project using Visual studio 2019;
now I make some changes in parser.js a js file in the project,then press F5 to debug,when I step into the code in parser.js,I found it actually run the code in the "parser.js[dynamic]" which is the old version.
I've tried several times,restart,even restart my computer,no use.
What I did wrong???
thanks for JPO's answer,but I got something wrong.
today I changed my code, also my html code, html codes I change are as follows:
<script src="Scripts/Parser.js?version=1.3" type="text/javascript"></script>
<script src="Home.js?version=1.3" type="text/javascript"></script>
yes, the old version is ?version=1.2.
Then press F5 to debug and I get this:
the DOM Explorer Home.html and Home.html
as you can see,the Home.html is changed but the DOM Explorer isn't
it seems like the Home.html has been cached.I wonder if I did something wrong and what should I do?
if you need more information please tell me and I'll post
as mentioned in my comment, this looks like a typical caching problem. Browsers tend to cache resources which aren't supposed to change often. E.g. styles or scripts. Therefore for development, it might be necessary to have tools like "Clear Cache" installed in the browser to clear the caches quickly. Or if it is just one file you are working on, then appending a get parameter e.g. ?version=1 (and increasing the value every time you update code inside the parser.js should be enough. Just don't forget to remove the parameter when you publish your code as the page load times will suffer.
Welcome to our community!
I am working to edit the month view of "The Events Calendar" in Wordpress. I cannot seem to figure out which files contain the relevant markup. The file structure seems to make sense, however, when I edit anything with /month no changes reflect.
The File Structure
Core Plugin Files
.../plugins/the-events-calendar/src/views/
Here we have several folders with the different views. One of which is "month" and, according to the documentation, contains the files I wish to edit.
Theme Files
.../mytheme/tribe-events/
This is the folder the documentation told me to create to place edited templates in.
The Fubar
When i follow the documentation for editing a single event located in /list everything works as expected. All I need to do is create a subfolder in mytheme/tribe-events/list and put a new file within to override the original.
When I repeat these same steps in order to edit a file within /month view things are different. For some reason none of my changes work. Outside of the /month folder in /views there is a month.php file which contains the following...
do_action( 'tribe_events_before_template' );
// Title Bar
tribe_get_template_part( 'month/title-bar' );
// Tribe Bar
tribe_get_template_part( 'modules/bar' );
// - My Custom Code -
write_log('This Log Works');
// Main Events Content
tribe_get_template_part( 'month/content' );
do_action( 'tribe_events_after_template' );
Note: write_log() is a function I use in php for debugging. It's essentially a console.log but appends the data to the end of the error.log file which i have being read by a terminal. I do not believe the issue is with this function as I have tested other methods.
The "month" file echoes my log just fine. However, when I add the same log into any of the files it is pulling from the 'month/' directory I get nothing. I went through every file in the subdirectories and added a log and realized that they all work except any file within /month
I thought maybe the issue was with the plugins' "tribe_get_template_part()" function pointing to the wrong place so I decided to eliminate the "am i making this child plugin right" variables and just start editing the plugin files directly. But I get the exact same behavior. I got so desperate that I deleted the entire /months folder from the plugin and the calendar still worked!
So obviously I am really missing something but currently I am at a loss.
This documentation is what I've been following to figure this out.
https://support.theeventscalendar.com/153124-Themers-Guide
The only thing I can think of at this point is that the javascript templating system built into the plugin is working some hidden magic but the fact that I can delete the entire months folder leaves me at a loss.
For anyone struggling with this still, I also had the same issue and solved it by disabling the Month View Cache under Event Settings > Display. Screenshot:
Following the guide on managing javascript in Drupal 7 I added a "myjs.js" file in my sites/all/themes/mytheme/js folder, and included a line in the mytheme.info file (scripts[] = js/myjs.js). When I view page source on my site I can see the file is loaded.
Following a number of issues, I tried to back out of this. I removed the scripts[] line in the mytheme.info file, and deleted the js file from the js folder. So, theoretically, my drupal 7 site should have no knowledge of my custom js file, right?
Well, after numerous clearing of caches, hard reload of browser, even stop/restart my xampp server, whenever I view source on my site I see that file is still referenced as being loaded.
Must be a database thing? Where else would Drupal store and therefore persist my reference?
I also tried adding a new js file in the .info file (e.g., "js/newjs.js") and after clearing cache I never see the new file. Only the old, original file is there.
I'm using a bootstrap subtheme, and have checked both bootstrap.info and of course mytheme.info and there is NO reference to the myjs.js file anywhere.
This is exasperating. Any thoughts where I might look (database record, e.g.,).
THanks.
Found the problem. I'm using AMPP as localhost server. When I first set this up I installed the D7 on my D: drive...or so I thought. I'm not sure exactly how AMPP works but I found there is another installation on my C drive in the Systems folder. Therefore, I have two installs, and thought I was working on the D drive version all this time. Oddly, both of them are "almost" in synch....so at some point recently the D drive version was running, but now it's the C. I never did a restore so have no idea whether the C drive is/was a "clone" of the D drive install. Whatever. Feel so stooopid. I guess the key learning is when everything should be working but isn't, and if odd things are happening, look for the simple-stoopid things you might have done. Chris G was almost on point...I had uploaded the js and .info files, but to the D drive!
So i am making a mobile app. in this app, on my main screen, i have a button that when clicked it will load another frame, or js file. this i know how to do but when pressing the button it gives me an error, "cant find file". after 3 hours of web searching i have tried changing the path names to every possible combination and moveing the file around. after doing so i came to realize that next to the new file i created, or any new file i create, there is an "*" and a question mark. for example if i make a new file called login.js it will show up on the explorer window as *?login.js, where the question mark is much smaller symbol. Is there a manifest i must add it to, like in netbeans, because it seems as if there is an error in the file but it is empty.
function signup(e){
var menu = Ti.UI.createWindow({
url: 'Main-Menu.js'
});
menu.open();
}
i also did: Titanium.include('/controllers/Main-Menu.js');
but always getting the same error, the JS file is in my apps controller folder.
This *? indication comes from the git plugin that is shipped with Titanium Studio. It indicates that the file is not commited.
To answer your "can't find file" - question, I need to know some more details about your environment (target platform, sdk version, example code, ...)