News for hackers. Stuff that matters.
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @10:27AM (#13811009)
Doesn't mention if the major problem I have with Firefox 51 is fixed. It makes a new, unauthenticated request every time I do View Source rather than showing the source of the page I'm looking at, which is an extreme PITA.

If View Source works properly, that'd be worth upgrading for immediately.

Re:Firefox 52 released by bzbarsky on Tuesday March 07, 2017 @01:35PM (#13813202)
This shouldn't be happening. We have explicit code to force view-source to read from the cache instead of hitting the server...

If you can reproduce this problem in a clean profile, please file a bug, cc "bzbarsky", and I'll take a look. Obviously, steps to reproduce would he helpful too.

If it doesn't happen in a clean profile, then we start looking into what's special about your existing profile.

Re:Firefox 52 released by mconley on Tuesday March 07, 2017 @02:20PM (#13813712)
Please cc me too. (mconley at mozilla dot com)
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @03:08PM (#13814241)
Ok now I have to do some embarrassing backtracking. In a clean profile I don't get the problem. Sorry for publicly whining about your product, which apparently works fine.

I'm not sure what I've done to make it not work here, but this profile dates from a long time ago so maybe it's just cruft or an extension behaving oddly. I'll switch to using a clean profile. Sorry again and thanks for your attention.

Re:Firefox 52 released by bzbarsky on Tuesday March 07, 2017 @11:51PM (#13817984)
Thank you for checking that!

If you still have the profile where it doesn't work, and are willing to do some detective work to figure out what it is that doesn't make it work (e.g. extensions or prefs.js or something else), that would be awesome. You're hardly the only Firefox user with a somewhat old profile, and it's possible that there's something specific going wrong that we should be handling better on our end...

Re:Firefox 52 released by nnethercote on Tuesday March 07, 2017 @07:53PM (#13816823)
This is a nice way to refresh your profile without losing all your history and other stuff: https://support.mozilla.org/t5/Procedures-to-diagnose-and-fi...
Re:Firefox 52 released by mconley on Tuesday March 07, 2017 @06:37PM (#13816341)
All good. Thanks for checking. :)
Re:Firefox 52 released by Etzos on Tuesday March 07, 2017 @10:46AM (#13811226)
This is the way it should be in every browser, actually. View source (as in the raw non-corrected source) can take up a considerable amount of space since it's only ever needed when someone is viewing the source. Otherwise the "source" gets transformed internally to be compliant with what the browser can understand and render.

Unless you were talking about some other kind of view source?

Re:Firefox 52 released by kbaker on Tuesday March 07, 2017 @11:25AM (#13811648)
Yeah but couldn't they stick some 'yes, please cache the source, I am debugging' option in about:config?

Then it only takes up space when someone needs it.

Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @10:50AM (#13811270)
The problem I have right now is that when I view the source of a page I'm working on, I get the source of the login page instead. I don't think that is justifiable behaviour.
Re:Firefox 52 released by Etzos on Tuesday March 07, 2017 @11:19AM (#13811588)
Considering the potential size of pages and that this would mean the browser would have to keep around all of the unmodified source for all of those, I think it's a decently justified position.

I will say that it would be nice if there was a way for them to recognize when the devtools are open and use that as a signal to keep around the source of the current page. But otherwise it would certainly cause significant memory bloat for each tab open.

Re:Firefox 52 released by JetSpiegel on Tuesday March 07, 2017 @11:18AM (#13811579)
You can open the dev tools, copy the request as cURL and run that in another terminal?
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @11:26AM (#13811653)
Yes that works, although it generates an option that my curl doesn't like (--1.0) so I have to edit that out (or find the option to change it in FF). Better than the strategy I suggested, but still a lot clunkier than Ctrl-U. Grumble.
Re:Firefox 52 released by yazaddaruvala on Tuesday March 07, 2017 @10:57AM (#13811344)
#spaproblems
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @11:14AM (#13811540)
It's not a spa, these are #websitewithloginproblems.
Re:Firefox 52 released by yazaddaruvala on Tuesday March 07, 2017 @11:45AM (#13811869)
That is surprising, that would imply that view-source isn't using the same cookies as the regular browsing experience.

Which seems like a bug.

Re:Firefox 52 released by Forlien on Tuesday March 07, 2017 @12:35PM (#13812553)
This seems strange. If you view page source on this comments page while logged in to Hacker News, does the source show you as not logged in? When I do that, my source contains the link to my profile (user?id=Forlien) at the top so I know it's giving me the logged-in version.
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @01:00PM (#13812830)
Actually no, it shows me as logged in (I can see the logout link).

Whereas with the site I'm working on locally, I get the login page. curl with appropriate options copied from firefox gets me the full page.

I don't know why I get different results with the two sites.

Re:Firefox 52 released by sp332 on Tuesday March 07, 2017 @10:28AM (#13811030)
That is annoying, but does the Inspector in the Developer Tools show what you're looking for?
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @10:36AM (#13811100)
As far as I know the way to get the unmodified source in the Developer tools is to find the html request in the Network tab, click on it, go to the Response tab of the small panel on the right and read the source out of said small panel (it's about 65x11 chars here). I'd much, much rather be able to just hit Ctrl-U and read it in a new tab. If there's an easier way then I'd like to know about it.
Re:Firefox 52 released by Drdrdrq on Tuesday March 07, 2017 @12:22PM (#13812370)
For me it suffices, though I too would prefer if "View source" just showed this same content. Maybe an extension could hijack Ctrl-U and display fetched source?
Re:Firefox 52 released by rpeden on Tuesday March 07, 2017 @10:42AM (#13811172)
The difference is that the Inspector shows the page exactly as it exists now, including any DOM changes that have been done via JavaScript. I typically use 'View Source' when I want to see the original page content before anything had been altered.

It looks like the the original commenter is talking about was first reported 12 years ago[1], so I wouldn't count on it being resolved any time soon. It just doesn't seem to be something that many web browser users actually care about, so I don't blame the FF team for not assigning much priority to changing the current behavior, even though I'd also like View Source to work the way way Joeboy is asking for.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=307089

Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @10:47AM (#13811243)
I think it's sporadically refixed and rebroken.
Re:Firefox 52 released by baq on Tuesday March 07, 2017 @10:34AM (#13811084)
but doesn't it show something completely different, ie. DOM after JS ran?
Re:Firefox 52 released by bigbugbag on Wednesday March 08, 2017 @08:48AM (#13820172)
Even better would be to have the possibility to edit said source from cache and see the result as was possible with opera until it kicked out its founder to become a google chrome skin and focus on quarterly profits.
Re:Firefox 52 released by jxelam on Tuesday March 07, 2017 @10:49AM (#13811265)
Does it not work to select all, right click and "view selection source"?
Re:Firefox 52 released by Joeboy on Tuesday March 07, 2017 @10:51AM (#13811285)
I think that gets the post-js version of the page, although I'm not 100% sure.
Re:Firefox 52 released by jxelam on Tuesday March 07, 2017 @10:56AM (#13811329)
Yes I think you're right. Although the post-js version would be the page you're looking at, so it makes sense it'd prioritise that over "what html was sent from the server which may not reflect what you're seeing".