johnnncodes / laravelsnippets

LaravelSnippets.com website | A repository of useful code snippets for Laravel PHP framework. Submit, grab and share!
http://laravelsnippets.com/
333 stars 97 forks source link

Blocked fake hit increment #98

Closed mayoz closed 10 years ago

mayoz commented 10 years ago

Blocked snippet hits increment with F5 key. I think the snippets (http://goo.gl/E7j3RW) hits is fake. This site does not appear until perhaps :) Cookies be removed or disabled. But let's at least a little precaution.

johnnncodes commented 10 years ago

Haven't tested this yet locally. Anyway, from what I understand, if the user clears the browser's cache, the user's view will still increment the snippets count right?

mayoz commented 10 years ago

As mentioned in comment, just a simple precaution. Another permanent alternative can be think.

ghost commented 10 years ago

Tested it and it's true.

If you clear your cache and hit F5 the hits increment.

I will test it locally and merge it.

ghost commented 10 years ago

Tested it locally and the fix that @mayoz did worked. It no longer increments views at every refresh of the page.

See #101

Closing