Hi Scratchers!
I viewed Unfamiliar. One of the featured projects on Scratch, when I clicked a love-it button because I thought it was truly amazing. That is where it begun. I clicked on another part of Scratch when I went backwards to look at the featured project again. I clicked Love-It again, because it didn't show up. I clicked it twice and it kept multiplying, so then I stopped. I wonder, how did this happen? Most importantly, why did it happen?
Reflect
Offline
I've seen people do that and comment: "I loved it 100 times" or whatever.

Offline
Reflect wrote:
TRocket wrote:
this is because the page is cached to avoid this press ctrl-f5 or shift-f5(FF) while you are on the page
if you want i can explain in more detailPlease do
![]()
Ok, when you go to a web page, your browser, instead of of having to download the page every time, the first time you look at the page it gets saved to your computer, this is called caching. Then when you go to look at that page the browser first checks to see if the page has been cached, if so it uses the cached page, if not it downloads it and caches it. a cached page has an expiry date when it reaches that date the cache gets deleted and must be downloaded the next time you go to that page.
When you go to http://scratch.mit.edu/projects/Hubalaboo/2572301 the page gets cached with the current number of love its, say 3 for example, then you click "love it" and the number goes up, to 4 in this example, then the love it is actually added through AJAX, which means the page doesn't have to be reloaded and then the text changes to "I love it" and if you were to click it again the love it is removed. when you go to that page next you see the cached copy with the number being 3 and the text saying "love it" when you click "love it" it changes the number and tells scratch.mit.edu to add a love it( through AJAX), but you have already added a love it for this project so the "Love it" text does not update to "I love it" and the button does not change to remove a love it the next time you click it, so when you click it the next time the above process is repeated. if you press ctrl-f5 or shift-f5(Firefox) the pages cache is deleted and it forces the page to be re downloaded.
caching on wikipedia
if ctrl-ft/shift-f5 does not work look at wikipedia how to bypass your cache
hope this helps!
Offline
TRocket wrote:
Reflect wrote:
TRocket wrote:
this is because the page is cached to avoid this press ctrl-f5 or shift-f5(FF) while you are on the page
if you want i can explain in more detailPlease do
![]()
Ok, when you go to a web page, your browser, instead of of having to download the page every time, the first time you look at the page it gets saved to your computer, this is called caching. Then when you go to look at that page the browser first checks to see if the page has been cached, if so it uses the cached page, if not it downloads it and caches it. a cached page has an expiry date when it reaches that date the cache gets deleted and must be downloaded the next time you go to that page.
When you go to http://scratch.mit.edu/projects/Hubalaboo/2572301 the page gets cached with the current number of love its, say 3 for example, then you click "love it" and the number goes up, to 4 in this example, then the love it is actually added through AJAX, which means the page doesn't have to be reloaded and then the text changes to "I love it" and if you were to click it again the love it is removed. when you go to that page next you see the cached copy with the number being 3 and the text saying "love it" when you click "love it" it changes the number and tells scratch.mit.edu to add a love it( through AJAX), but you have already added a love it for this project so the "Love it" text does not update to "I love it" and the button does not change to remove a love it the next time you click it, so when you click it the next time the above process is repeated. if you press ctrl-f5 or shift-f5(Firefox) the pages cache is deleted and it forces the page to be re downloaded.
wikipedia how to bypass your cache[/url]
hope this helps!
This helped alot! Thanks for posting!
Offline
That happened to me when I just registered. I made it have like, 100 love its, when there was around 10 views. I was really scared I would get accused of hacking. :L
...Until I refreshed the page, that is.
Offline