HTML:Why my change is saved in some places and not elsewhere

  • Topic: HTML/CSS 
  • Thread starter Thread starter mooncrater
  • Start date Start date
  • Tags Tags
    Change
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
6 replies · 1K views
mooncrater
Messages
215
Reaction score
18
Last week I tried to change the source code of google's new tab page and facebook's homepage. As we know that we can't change the actual page ...It will be the same as soon as I press the refresh button. And that was okay to me.
But, recently I visited this site "www.hackthissite.org" , where they have some exercises on computing , hacking and stuff. There was this exercise where the source code had an e-mail address , and we had to change it to ours'.And then the e-mail would be sent to the e-mail address we gave. And yeah it worked too! But how?
As much as I know, the browser should "forget" the changes I made to the source code , but it didn't.
So, what is behind this?
I am confused over this think,any help appreciated. :)
 
Physics news on Phys.org
Browsers usually download a copy of a page's HTML code and cache (store) it somewhere on your computer, so that if you return to the page soon, it can simply read that copy, which is faster than downloading the page again. So if you change the cached copy of the page, it will remain available to your browser.

Your browser should have an option somewhere to "clear the cache". That will make it "forget" any changes you made.
 
  • Like
Likes   Reactions: mooncrater
So actually I am changing a cached copy. Nothing is being changed on "their" side of the site. Isn't it?
 
You can change the code on the server that hosts the site only if you have the site owner's login credentials: username and password, or SSH private key, or whatever.
 
  • Like
Likes   Reactions: mooncrater
So I can't change anything of a site which I don't own unless I have permission to do that?
 
Exactly. Unless you steal or bypass the site owner's login credentials, which we don't support discussing here, by forum policy. It's against the law, at least in the US.
 
  • Like
Likes   Reactions: mooncrater
Yeah,thats just the last thing I would do( or won't do at all..;)). It's just like stealing someone's car, so it should be illegal.
Thanks for your help.
 
  • Like
Likes   Reactions: Silicon Waffle