Delete favicon.ico file from blogger - javascript

I replaced the favicon of in my web page with the one I wanted giving reference to another page that has saved the file. But despite that works and the favicon is displayed, the website also charges the old file, which I do not want because the presence of the old file causes conflicts with the SSL certificate that I installed.
My question is: How can I remove old resident .ico file in my domain if Blogger does not allow me the option to completely remove it?
PS: Neither I can not remove the reference to the old file in the code because it does not appear explicitly but rather with javascript.

I finally get an answer for my question. Just is deleting this line code on the template:
<b:include data='blog' name='all-head-content'/>
Maybe deletes RSS reference but do you can copy it from the code before deleting the line mentioned, pressing Ctrl + U in the website and then pasting it on the template.

Related

Why can't I get my script tag src's to work?

I have been coding up a localhost, and I made the localhost by using of course a JavaScript file to do so, and I then made it reference an HTML file. However, I noticed that when I am using localhost to serve up the HTML file I get this error:
"GET http://localhost:3333/filetesting.js"
The filetesting.js is that js file, there are also other things I'm referencing too, like websites. I'm referencing it by using script tag src.
I looked at the network on developer tools of it and it says it's a 404 error not found. I'm trying to figure out how to reference my script tag src's without having localhost:3333 go before it.
When I run the HTML file without using the localhost, it works just fine when it comes to the script tag src's. If you do not entirely understand what I'm asking for, just ask.
Assuming that your script will always reside in the root level of your website, you can simply target it with the root-relative prefix /:
<script src="/filetesting.js"></script>
This will load your script from the root, regardless of the site the file is hosted on. For example, on http://localhost:3333/ it will load the file from http://localhost:3333/filetesting.js, and from http://localhost:3333/folder/, it will attempt to load the file from the same location.
If you move your files over to a proper website, it will still work the same way: www.example.com will look for the file at www.example.com/filetesting.js, and www.example.com/folder/ will look for the same file at www.example.com/filetesting.js.
Hope this helps! :)

Why my site isn't fully functioning on public domain (in the world wide web)?

I made a simple website. The site is fully functionable in my localhost (my computer). Everything working fine here.
But problem arises when I upload the files into the web server in order for running that in public domain. There, no content is showing except the layout. No link or tab is working, no paragraph inside the body is displaying. You may have a look here.
For what reason?
I uploaded all the files (with source code) associated my website except the images and videos (since there are a lots of images and I will upload it a bit later).
[NOTE: I have xampp local server installed in my computer. All the
sourse codes files are stored inside the htdocs folder. Inside the
htdocs folder I have a folder named jquery(which was installed with
the package). I saved my .JS file inside the JQuery folder (since I
used jquery code too). So when I upload file into the server do I need
to upload the whole htdocs folder? Or how about the JQuery folder
(which contains the JQuery source code)? Do I also need to upload it?
My paths set are the following:
C:\xampp\htdocs\jquery [contains the whole project's source file]
C:\xampp\htdocs\jquery\js [Contains only JavaScript&JQuery file]
If you inspect your page and look where you expect the content to be, you'll find <div id="home">. Looking at the CSS for this, it shows line 258 of your css file has this:
#all_contents >div {
display:none;
}
This is causing all of your contents to not display. Removing this will fix the problem.
Also, if you look on the browser's console when your page loads, you'll notice a lot of 404s trying to load various scripts, stylesheets, and images. That's potentially contributing to the problem. I'd focus on fixing those first, to make sure everything is loading properly.
I tried debugging the HTML on your website. I found the following code in design.css at line number 258
#all_contents >div {
display:none;
}
Once you remove this(display:none), all the content is available on the website link that you shared.
Also, I am not sure why this is working on your local. Are you sure that you have uploaded the same version which is running in your local?
You can debug your webpage by pressing F12 and then selecting the problematic area. On the right hand side, you can see the css rules associated with the selected element.
For getting the specific content in a page and not all, create a new file by the name who_im.html and put your content over there and then You should do something like
About Me
Like this you will have to make other pages as well and add the hyper links to the menu in every page.

is there a way to save css/js changes of remote resource between page reloads or map remote resource to local in devtools?

I know about Workspaces recently introduced in DevTools but that is not that i need. For example: page uses jquery that is loaded from CDN, i modify jquery library code, press ctrl-s, reload page -> modifications are lost. Or i want to debug some site i don't have an ability to change files of.
I don't want only save changes as in save CSS - while browsing, how can I save the css files from inside chrome dev or firebug to local directory, i want them to persist between page reloads.
You got most of it, but here's the slight change:
Make a change in the Styles pane (or in Sources), then click over to Sources, and when your modified file is open, hit ctrl-s.
Then you can right-click the asset in the Sources list and hit Save As... and save the new modified file to disk.
There is no way to save a modified remote file without persisting it to disk and expect it to be changed on reload.
Workspaces allow you to edit files mapped to a local directory - but naturally, a pre-requisite is to be serving local files.
If you're playing with files you don't have direct/convenient access to (for whatever reason), I recommend setting up a tampering proxy like Burp. In a nutshell, you would be able to modify the server response and perform on-the-fly search and replace like cdn.example.com/jquery-library.js to localhost:8080/jquery-library.js in the html body. All you have to do afterwards is set up a local server (trivial) and edit the local instance of the script!
This is a handy pattern to preview local changes against production content, as long as it's not used in lieu of a test environment.
It is possible, but quite tricky:
open resources and right clik to the folder with styles\resources (fo
not forget to click "allow" on the dialog that appears below the
adress bar)
then right click on the concrete resource and choose "save as" (save
it to the working directory that you specified in the prev step)
then right click to the same resource and choose "Map to file system
resource" (write the same name as in prev. step, e.g. all.css but not
all.css?id=234234234, just in case)
modify the styles in the dev tools.
refresh the page (and realise that all you modifications doesn't
applied)
open resources, find your workspace folder and your resource in it
(e.g. all.css)
right click on that resource and choose "local modifications"
in opened console click to "apply original content" and realise that
you styles has been applied =)
It's quit a tricky way and the better idea is to use something like fiddler to replace resources to local files.
You could try it this way (for jquery):
-load the page first time and on the sources tab put a breakpoint on line number 1
-then reload the page modify the file and save ( you can see that the page has paused due to the breakpoint )
-press the play button and the page will start to load.
The modifications you made will work. The downside of this solution is that once you refresh again the page, the modifications will be lost.
Hope that helps!
As far as I can tell, there's no way to do this in Chrome's DevTools. You should look through the documentation about saving and making local changes. The only thing that seems to persist through reloads is snippets... but it doesn't seem like that's what you want.
If ever a solution for this is made... I want it. For now, it seems the best you can do is content scripts and the like.
I don't know if this qualifies as an answer, but it is what I am doing, and the closer that I have get to what you want.
I load the page in the browser, and the I do save as in a local file. Note that I am saving the full page, with HTML, js and CSS.
Now, if I want to modify the a CSS, I edit the HTML and direct these file (or files) to my development files.
I reload the page, and now I can work as you want (saving and reloading what I have saved).
Of course that means that you have full access to the files, and most probably they are local, but I don't think that you are really willing to edit the real web files on line.
When I am finished modifying the files, it's just a matter of syncing my dev files with the web files .
Just a tip, under Firefox i use Greasemonkey. I dont know if you know this tool, but it allows to run javascript scripts over a webpage for a website. Then, with an adapted javascript you can change css dynamically.
A little get started for greasemonkey:
http://www.webmonkey.com/2010/02/get_started_with_greasemonkey/
For chrome it is tampermonkey :
http://tampermonkey.net/faq.php
I use my apache in debug mode with eclipse so the cahnges are reflected to the site as soon as I save the page.
Note, Utilizes jQuery library (not required)
Try, at console
function restyle() {
$("*").css("color", "blue"); /* development elements, css, js */
$("head").append("<script>console.log(\"restyle\")</script>"); /* js */
var t = document.querySelectorAll("*"); /* modified document */
var outer = document.documentElement.outerHTML; /* modified document */
var inner = document.documentElement.innerHTML; /* modified document */
return $.ajax() /* `pseudo` `reload` */
.done(function(data) { /* original document */
document.documentElement.innerHTML = outer; /* `psuudo` `document` `reload` */
console.log(data, inner, outer, $(t)) /* options, `callbacks` */
/* $.each($(t), function(index, value) { console.log(value) }); */
})
};
restyle();
See https://stackoverflow.com/a/31585725/52817:
The Resource
Override
extension allows you to do exactly that:
create a file rule for the url you want to replace
edit the js/css/etc in the extension
reload as often as you want :)
You can even add a tab to the dev tools.

I can't open JS files in Windows from Filezilla

I logged in to my FTP from Filezilla and tried to open a JS file, and it gave me the following error:
Script: C:/.../slider.js
Line: 1
Char: 1
Error: 'document' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
I have jQuery linked to the .php file as well...'document' comes from:
$(document).ready(function() {
//Code is here...
});
I tried downloading the file and opening it, I tried removing the $(document).ready();, I tried removing jquery (which by the way, when I opened the jQuery file it gave me the same almost the same error). Any help is appreciated. Thanks!
EDIT:
One of the tags for this post was "asp.net", but to be honest I don't even know if it is related to asp.net...
I had the same issue and fixed it by doing the following in Filezilla:
Go to Edit > Settings
Go to the 'File editing' section
Under 'Default Editor': Ensure that Notepad++ is selected as your custom editor
Change the radio button from 'Use filetype associations if available' to 'Always use default editor'
You say that you're right clicking and clicking "View/Edit", and it throws that error.
The error is occurring because Windows is executing the script, and the script has a problem (because it relies on another script being loaded).
So although you may be clicking "View/Edit", and expecting that this will open the file in Notepad++, what it is actually doing is assuming that "View" means "Run the script".
Clearly, Notepad++ is not the default action for this file type, or at least it isn't according to Filezilla. Maybe the default action isn't actually set the way you think it is, or maybe it's Filezilla that isn't respecting your default action.
The solutions:
If Filezilla has an option "Open with..." that allows you to pick the program to open the file with, then use that and select Notepad++ manually. Even better, if it has the option to then make that the default, then tick it, and the problem should be solved permanently.
Alternatively, just download the file to your local machine before trying to open it.
I got this working in FileZilla by doing the following: -
Edit -> Settings
File editing -> Use custom editor [file path to notepad ++] then
|___File editing -> Filetype associations
Adding the line -> js "C:\Program Files (x86)\Notepad++\notepad++.exe"
Click OK to save changes
This will stop windows script host from attempting to run the file and open in notepad++.
While the question has effectively been identified previously in the post I hope that someone finds this 'how-to' useful.
This is not a programming problem. It's a file association problem - Windows is trying to execute your .js file instead of opening it in an Editor.
See this question on SuperUser: running-javascript-files-js
There's also some explanation of the error here.
Check your file associations again. Try restarting your machine. You will get more help if you ask this type of a question on SuperUser.
It's worked for me after adding the file association.
Edit -> Settings
File Editing -> Select Use filetype association if available checkbox.
Select Filetype Associations -> add association here
js "C:\Program Files\Sublime Text 3\sublime_text.exe"
OK
Note: change association according to your text editor application.
Just follow these steps. It is an easy one to do. Change the default file type for opening the js files.
Edit -> Settings
File editing -> Filetype associations
Adding the line -> js "C:\Program Files(x86)\Notepad++\notepad++.exe"
That's it. Finally, Click OK to save changes.
It will work afterwards.

Get full path from input[type=file] javascript

I know this has been asked plenty of times, but this is a special case. I'm working on an online HTML editor, using the design function of HTML 5 browsers (yeah, I found a useful application for this feature). I want to let the developer load a page, but developers are lazy (so am I), so I don't want them to enter the full path to their page. To prevent this, I use a file input (id="temp") WHICH DOESN'T GO TO THE SERVER!!!
I tried to open the local HTML file in a new browser in several ways, but the relative links in the page don't work:
window.open(temp.files.item(0)?temp.files.item(0).getAsDataURL():'',title.value,'width='+screen.width+',height='+screen.height)
The URL is encoded. This way the links in the file don't work, like in a ZIP file.
last = window.open('',title.value,'width='+screen.width+',height='+screen.height)
if(temp.files.item(0))
last.document.body.innerHTML = temp.files.item(0).getAsText("utf-8")
This code opens a blank page and copies the HTML code to the blank page. Of course the links in this page don't work either. temp.value only shows the filename, not the path.
Browsers simply will not tell you the information you want. The "value" property of "file" input elements does not contain the path.
If "the page" is really just an HTML page, then you might want to look into the HTML5 file reader stuff and see if you could at least read the file contents and dump them into a new browser window/tab. There might still be problems with HTML documents that expect to be able to locate auxiliary files (CSS, images, etc) via relative paths.

Categories