4 ms·
I guess we must disable view-source in all browsers now! Welcome back to the 70s where you could only use a phone made by AT&T and got to rent it at $10/month.
by nanis 5y ago
I guess we must disable view-source in all browsers now! Welcome back to the 70s where you could only use a phone made by AT&T and got to rent it at $10/month.
- Gigachad 5y agoChrome is actually adding a feature that lets school admins disable view source because school test pages had the answers in the source.
- karlding 5y agoEnterprise-level Chromium removes view-source to prevent students from cheating [0]. [0] https://news.ycombinator.com/item?id=29211611 https://news.ycombinator.com/item?id=29211611
- speedgoose 5y agoCan you still write something like javascript:alert(document.body.parentNode.innerHTML) in the address bar and press enter?
- tzs 5y agodocument.documentElement.innerHTML might be better than document.body.parentNode.innerHTML. The latter fails if there is no body element, e.g. when the page is an SVG document. If you want a closer approximation of the full source, outerHTML might also be better. I've also seen "new XMLSerializer().serializeToString(document)" suggested. That seems to give the most complete source, but I've also read that it might have problems with things that need escaping. I have no experience with that approach because for what I needed the first thing I found when Googling, document.documentElement.innerHTML, gave me what I needed. One more thing to consider. All of the above I'd expect give you source that would produce the currently displayed page including any modifications that were made after loading by JavaScript (which is probably what you'd want for cheating on a test so is fine). I'm not sure that is the same as what "view source" gives--does it give the current page or the page as it came over the wire?
- addingnumbers 5y agoI worked in DSL support for one of the baby bells back in 2002 and talked to a customer who had a line item in her bill for telephone rental that went back as far as the billing system could show me. It jumped out at me since I'd seen thousands of bill plans and never saw that line item before. She said she had the phone installed on the kitchen wall around the time her grandson was born. He was 27. I told her she could replace it for less than 20 bucks and she said no thank you she liked this phone very much. She wasn't calling about the bill, she just wanted to get her e-mail working. She spent upwards of $3,000 on that phone in rental fees alone. She might be still paying it today for all I know.