I know how to add contents to the HTML file that is currently loaded in the browser, now I just want to find out if there is a way to save those changes to the .html file itself. Basically when the file is closed and loaded again later it should still have the dynamically added content.
asked Aug 24, 2015 at 7:15
4
There is also indexedDB
if you need to store more complex/large amounts of data, Client side. There is no need for server side scripting for this.
SessionStorage and LocalStorage only store strings, so if you needed to store objects you would have to stringify it first. However with indexedDB it wont.
It's quite a bit more involved than sessionStorage [too much to explain here] but these links helped me when i was looking into it.
Basically you connected to the database, handle any required upgrades to it [this handles fist time creation and setting up of transactions], then you get your object store and finally perform your reads, updates etc against that. The majority of the work is in the setup and upgrading of the DB.
//developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API //code.tutsplus.com/tutorials/working-with-indexeddb--net-34673
answered Aug 24, 2015 at 7:32
ste2425ste2425
4,5032 gold badges20 silver badges37 bronze badges
You can use Session Storage.
window.onload = function [] {
if [sessionStorage.getItem["savedItem"]]
document.querySelector["#store"].value = sessionStorage.getItem["savedItem"];
document.querySelector["#store"].onkeyup = function [event] {
if [event.keyCode == 13] {
sessionStorage.setItem["savedItem", document.querySelector["#store"].value];
alert["Saved!"];
}
};
};
answered Aug 24, 2015 at 7:20
2
You cant do this with HTML alone. Use server-side scripting language [e.g. PHP] with a database [e.g. MySQL]. Store your page content on the database and feed contents to your html page using the server-side script.
[you can also use XML file to store the data. no need of database]
answered Aug 24, 2015 at 7:32
HasiHasi
363 bronze badges
NoS
unread,
Jan 10, 2009, 7:38:34 AM1/10/09
to Firebug
Hi i would just like to know how i can save the changes i make to a
webpage so that whenever i go on the webpage the changes that i
previously made to it will still be applied each time i visit it.
John J Barton
unread,
Jan 10, 2009, 8:01:12 AM1/10/09
to Firebug
Firebug can't do that. There are other tools that try it.
jjb
NoS
unread,
Jan 10, 2009, 8:15:55 AM1/10/09
to Firebug
Do you know which tools can do that?
Marc Weber
unread,
Jan 10, 2009, 8:49:25 AM1/10/09
to
> Do you know which tools can do that?
AdBlockPlus does this for removing advertising..
That's all I know about.. Anyway: how should this look like? Should
firefox or firebug start saving a html diff and try to apply it ? This
will fail far too often..
You should start talking about what you really want to do ?
Give some examples what you want to edit and why.
Marc Weber
NoS
unread,
Jan 10, 2009, 11:41:51 AM1/10/09
to Firebug
Basically something along the lines of going to this page
//www.imdb.com/title/tt0421715/ and then editing the part where
it says trivia and
removing it the text completely and saving it like
that so whenever i visit the page the trivia part under "Fun Stuff"
never appears again unless i change it back to default.
Brian Di Palma
unread,
Jan 10, 2009, 6:16:01 PM1/10/09
to
Mybe Greasemonkey will do this but only you will ever see the changes.
virtualburn
unread,
Jan 10, 2009, 11:18:37 PM1/10/09
to Firebug
I've just installed Firebug and had a similar question as I usually
had to cobbect to the web server via a web based ftp to edit and save
CSS in realtime - I was hoping that Firebug was the answer to this..
obviously not.
So this is just a glorified CSS and HTML viewer for 3rd Party Sites..
[or
your own] nothing more.
Would this functionality be an added benefit, as firfox remember most
of my passwords for the backend of sites anyway, this wold just be
able to save directly to the file. Not that's a handy tool.. not a
bumped up view source.
On Jan 10, 10:16 am, "Brian Di Palma" wrote:
> Mybe Greasemonkey will do this but only you will ever see the changes.
>
> On Sat, Jan 10, 2009 at 3:41 AM, NoS wrote:
>
> > Basically something along the lines of going to this page
> >//www.imdb.com/title/tt0421715/and then editing the part where
ron_s
unread,
Jan 11, 2009, 1:10:02 AM1/11/09
to Firebug
You can't change another website unless you own that site. Firebug is
a development tool for investigating websites, not for making changes
to them. You need to take the information you learn through Firebug
and use it on websites you build.
On Jan 9, 9:41 pm, NoS wrote:
> Basically something along the lines of going to this
page//www.imdb.com/title/tt0421715/and then editing the part where
NoS
unread,
Jan 11, 2009, 1:29:46 AM1/11/09
to Firebug
On Jan 10, 5:16 am, "Brian Di Palma" wrote:
> Mybe Greasemonkey will do this but only you will ever see the changes.
>
Yes that's what I meant. I don't want to change the website i just
want to make it so the text never shows up for me on my computer. Is
it possible to do this with firebug?
virtualburn
unread,
Jan 11, 2009, 1:30:21 AM1/11/09
to Firebug
So is there anything that you can plug in to firefox that would allow
this..?
On Jan 10, 5:10 pm, ron_s wrote:
> You can't change another website unless you own that site. Firebug is
> a development tool for investigating websites, not for making changes
> to
them. You need to take the information you learn through Firebug
> and use it on websites you build.
>
> On Jan 9, 9:41 pm, NoS wrote:
>
> > Basically something along the lines of going to this page//www.imdb.com/title/tt0421715/andthen editing the part where
Brian Di Palma
unread,
Jan 11, 2009, 2:29:21 AM1/11/09
to
Nope Firebug will not save your changes for you - but it's so much more then a bumped up view source editor that I don't even know where to begin! Obviously if you aren't doing any actual development then I suppose you can view like that but if you are doing any development it's a fantastic tool.
dan gaz
unread,
Aug 16, 2011, 5:11:50 AM8/16/11
to
Ricardo Barandiaran
unread,
Oct 5, 2013, 7:37:45 AM10/5/13
to
Hi, hope someone can help me because I want to make changes to the listings where my company appears [yellow pages and others] because is showing the wrong web page, I can do the changes, but I can't save them. I'm not paying them, so I can't call them
Farshid Beheshti
unread,
Oct 5, 2013, 3:31:26 PM10/5/13
to
I think you mean the pages you don't access to, it's not possible at all.
James Watt
unread,
Oct 5, 2013, 3:39:42 PM10/5/13
to
You obviously can't make changes to a page u don't have access to. Unless it would mean that u can make changes to any page of any website in the world.
Sebastian Zartner
unread,
Oct 10, 2013, 7:27:49 AM10/10/13
to
What the others want to say is in order to get the data changed please contact the owners of the pages.
Sebastian
PS: Please try to avoid hijacking threads that are several years old and create a new one next time.
BobN
unread,
Sep 2, 2015, 7:22:52 AM9/2/15
to Firebug
Firebug is a tool used by programmers to step though their programs, looking at flow of the execution, intermediate values for variables and properties, to track down the source of a problem. As such, it has no bearing on making actual changes to any part of a web page such that you could save them and apply them every time you go to a particular site.
As a web site owner and creator I would not like to learn that there was some tool that would make drastic changes to my pages and modules such that those changes could be applie every time the person goes to one of my pages.
Indeed, you seem to be are referring to other people's web pages. There simply is no way to "permanently" modify someone else's web pages unless they give you access or you hack the FTP account.
You seem to be asking a user question when this is a forum for "how to" questions related to actual creation, coding, and testing of HTML, JavaScript, CSS, and all the other bits and pieces of a web page.
There is a tried and true way to record changes you make while using Firebug or when modifying element properites withh an "inspector".so that you can then make those changes in the actual JavaScript, CSS, HTML, etc. It is a very useful which was created surprisingly early in the history of computing - pencil [or pen] and paper.
Take notes. If you don't note the changes you make you'll likely get it looking or working exactly like you want and then realize that you can't remember all the changes you made.
Pencils and paper are remarkable tools.
They are quite cheap, very user friendly and intuitive, use very little energy - the energy which operates them comes form the sun, a renewable source of energy, they are very portable, they require little to know training to use, you can always find compatible replacements, they are easy to upgrade, you can let the kids use them with out the fear of major damage to them [the tools, not the kids], they are usable with any language, you can use them at a very detailed level or a "shorthand" level, the only maintenance tool you might needed is a re-pointing tool for when one of them become misshaped through use, they have a very long shelf live, very resilient, and they work in a variety of dirty or wet conditions. As to re-pointing, in a pinch a pencil can be restored to usable condition, maybe not optimal condition, using the all most ubiquitous abrasive properties of construction materials which are hard and rough to the touch [concrete or bricks..]
Oh, some of the most profound ideas and concepts have been recorded using this simple, but versatile, tools.