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

  • Thread starter mooncrater
  • Start date
  • Tags
    Change
In summary, browsers usually download a cached copy of a page's HTML code and if you change the cached copy, it will remain available to your browser.
  • #1
mooncrater
217
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
  • #2
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
  • #3
So actually I am changing a cached copy. Nothing is being changed on "their" side of the site. Isn't it?
 
  • #4
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
  • #5
So I can't change anything of a site which I don't own unless I have permission to do that?
 
  • #6
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
  • #7
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

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

1. Why is my change not showing up on certain pages?

This could be due to several reasons. One possibility is that the page you are viewing is cached, meaning it is stored in your browser's memory and not loading the most recent version from the server. Try clearing your browser's cache and refreshing the page. Another reason could be that the change was made to a specific section or element on the page, and that section is not present on the other pages.

2. How can I make sure my change appears on all pages?

To ensure that your change is reflected on all pages, you can use a global stylesheet that applies to all pages on your website. This way, any changes made to the stylesheet will be reflected on all pages. You can also use a template or include file to apply the change to multiple pages at once.

3. Is there a way to undo a change in HTML?

Unfortunately, there is no built-in "undo" function in HTML. You will need to manually make changes to revert the previous change. However, if you are using a code editor, many of them have an "undo" button or keyboard shortcut that can help you revert changes.

4. Why is my change not working on mobile devices?

This could be due to the fact that different devices have different screen sizes and resolutions, and your change may not be optimized for all devices. You can use media queries in CSS to target specific screen sizes and make adjustments accordingly.

5. Can I make changes to a live website without affecting its functionality?

It is generally not recommended to make changes to a live website without proper testing and approval. This is because even small changes can have unintended consequences on the functionality of the website. It is best to make changes in a development environment and thoroughly test them before implementing them on a live website.

Similar threads

  • Programming and Computer Science
Replies
3
Views
348
  • Programming and Computer Science
Replies
4
Views
419
  • Feedback and Announcements
Replies
5
Views
132
  • Computing and Technology
Replies
20
Views
1K
  • Classical Physics
4
Replies
131
Views
4K
  • Other Physics Topics
Replies
3
Views
1K
  • Programming and Computer Science
Replies
6
Views
4K
  • Programming and Computer Science
Replies
4
Views
3K
  • Sticky
  • General Discussion
Replies
0
Views
159
Back
Top