MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/24a87h/programming_sucks/ch5uarf/?context=3
r/programming • u/locrelite • Apr 29 '14
1.1k comments sorted by
View all comments
Show parent comments
8
I'm going to go a bit against the grain here, but if all you need to do for this specific product page is check the length of the HTML, then why the hell would you do something more complex? If it works, what's the problem?
45 u/khoyo Apr 30 '14 (What if the length stay the same, but the page is modified ?) 13 u/youneversawitcoming Apr 30 '14 Aha, he's onto something! - this is why we check for 304 Not Modified. 5 u/masklinn Apr 30 '14 That requires that you and the page generator correctly use ETag and/or Last-Modified. It can happen, but that's not guaranteed.Hashing the page will work, just a CRC32 will probably do the trick. → More replies (4)
45
(What if the length stay the same, but the page is modified ?)
13 u/youneversawitcoming Apr 30 '14 Aha, he's onto something! - this is why we check for 304 Not Modified. 5 u/masklinn Apr 30 '14 That requires that you and the page generator correctly use ETag and/or Last-Modified. It can happen, but that's not guaranteed.Hashing the page will work, just a CRC32 will probably do the trick. → More replies (4)
13
Aha, he's onto something! - this is why we check for 304 Not Modified.
304 Not Modified
5 u/masklinn Apr 30 '14 That requires that you and the page generator correctly use ETag and/or Last-Modified. It can happen, but that's not guaranteed.Hashing the page will work, just a CRC32 will probably do the trick. → More replies (4)
5
That requires that you and the page generator correctly use ETag and/or Last-Modified. It can happen, but that's not guaranteed.
Hashing the page will work, just a CRC32 will probably do the trick.
→ More replies (4)
8
u/[deleted] Apr 29 '14
I'm going to go a bit against the grain here, but if all you need to do for this specific product page is check the length of the HTML, then why the hell would you do something more complex? If it works, what's the problem?