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

  • Thread starter Thread starter mooncrater
  • Start date Start date
  • Tags Tags
    Change
AI Thread Summary
Changing the source code of web pages like Google's new tab or Facebook's homepage does not persist because those pages are not modified on the server; any changes are temporary and only affect the cached version in the browser. The exercise on "hackthissite.org" allowed for changes to be saved because it involved altering a cached copy of the page, which the browser retains until the cache is cleared. Users can clear their browser cache to remove any changes made to these local copies. To change a website's actual code, one must have the necessary permissions or credentials from the site owner. Unauthorized access to a website's code is illegal and not supported in forum discussions.
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. :)
 
Technology 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 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 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 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 Silicon Waffle

Similar threads

Back
Top