|
If you are editing a message in window 1, then visit window 2 which drops a cookie, do you have access to that new cookie in window 1 immediately? I doubt you would. It's also extremely hit and miss.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
I'm not sure, but I suspect so (I'll try make time to create a quick test this weekend). Though, cookies are sent to the server with each page request. If a user views enough articles, that data could grow and slow down their page load times a bit. One possible way to overcome that would be to only store info on the last 25 articles viewed.
I don't think it would be very hit and miss. How often do you think users paste article URL's without having recently viewed that article? I usually copy the URL's directly from the browser address bar.
|
|
|
|
|
You can copy a URL from a favorite button, i.e. without opening the page. Your articles are amongst your favorites, aren't they?
|
|
|
|
|
Nope, I use Code Project's bookmark feature. Also, that doesn't seem to work from IE9 (I suspect IE copies the shortcut file rather than the text URL). Unless you are talking about going to the properties for the favorite and copying the link from there, which somebody COULD do. And I'm sure somebody COULD view an article in one browser then paste it into a different browser, or they COULD have a giant list of URL's stored in a text file... but I doubt that happens often.
|
|
|
|
|
I was referring to the bookmarks bar as it exists in FireFox, Chrome, and probably the others as well. Just right-click and choose "Copy".
And no, I seldom use the "CP bookmark feature", as that only works for CP material; I have a universal bookmark system in place, with an actual database so I can store whatever I choose, then search, list, sort, etc.
|
|
|
|
|
Chris Maunder wrote: If you are editing a message in window 1, then visit window 2 which drops a cookie, do you have access to that new cookie in window 1 immediately?
Yes. Here's how I demonstrated that... create Page1.aspx:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page 1</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<p><a href="#" class="setCookie">Set Cookie</a></p>
<p><a href="#" class="showCookie">Show Cookie</a></p>
</div>
</form>
<script type="text/javascript">
<!--
function setCookie () {
var expires = new Date((new Date()).getTime() + 1000 * 60 * 60 * 24);
document.cookie = "recent_pages=123,456;expires=" + expires.toGMTString() + ";path=/";
}
function showCookie () {
alert(document.cookie);
}
$(function () {
$(".setCookie").click(function () {
setCookie();
return false;
});
$(".showCookie").click(function () {
showCookie();
return false;
});
});
</script>
</body>
</html>
Then create Page2.aspx:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page 2</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<p><a href="#" class="setCookie">Set Cookie</a></p>
<p><a href="#" class="showCookie">Show Cookie</a></p>
</div>
</form>
<script type="text/javascript">
<!--
function setCookie () {
var expires = new Date((new Date()).getTime() + 1000 * 60 * 60 * 24);
document.cookie = "recent_pages=789,987;expires=" + expires.toGMTString() + ";path=/";
}
function showCookie () {
alert(document.cookie);
}
$(function () {
$(".setCookie").click(function () {
setCookie();
return false;
});
$(".showCookie").click(function () {
showCookie();
return false;
});
});
</script>
</body>
</html>
Run them both in the same web application. Click "Set Cookie" in Page1.aspx, then click "Show Cookie" in Page2.aspx. You will note that Page2.aspx displays the cookie set in Page1.aspx.
|
|
|
|
|
Hi there,
I just completed a long article which took a good 2 hours to write. The website told me it had "Autosaved" the article. On submission an error occurred and it now appears to be lost.
Can you please have a look into this and let me know if the article has been saved in part?
Best regards,
Andrew
|
|
|
|
|
|
|
It's great to know the auto-save works. It's painful to hear of members losing work due to browser crashes.
Let us know if there's anything else you need.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Yep, it works. A little difficult to find. Usually with forum posts I copy/paste HTML into notepad precisely because it can fail. Autosave gave me confidence to post without doing that - but then I was gutted I didn't take a backup!
Fortunately all ok now. Thanks!
|
|
|
|
|
Dr. Andrew Burnett-Thompson wrote: A little difficult to find.
Our thinking was that if the submission page failed you'd start again by following the trail back to the initial submissions welcome page (Submit.aspx) so it's on that page we listed the auto-saved drafts.
What would be more convenient in your mind?
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
My reputation history shows current date but the logs are from 6 months back!
For a moment, I thought my account was hacked as I saw pretty weird forum posts! (Later turned it was just ME, 6 months back!)
-
Just that something can be done, doesn't mean it should be done. Respect developers and their efforts!
Jk
|
|
|
|
|
|
My MVP certificate turned up today. Thanks. It means so much to me.
|
|
|
|
|
Glad to hear it arrived safetly. After I dropped it off, I mean.
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
Sean Ewington wrote: After I dropped it off, I mean.
You know you can't just stop there, Sean. Well, what were you wearing?
"the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011) "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)
"It is the celestial scrotum of good luck!" - Nagy Vilmos (2011)
|
|
|
|
|
My Code Project delivery outfits are well documented. And now, my Code Project delivery outfit celebration is immortalized in Pete's sig.
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
Same here, and also to you Pete, and all the others, who have upvoted my posts/articles/tips and generally given me good feedback over the year(s).
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hey Richard, you earned that diamond.
|
|
|
|
|
Please can you remove me as an joint author on ASP .Net Web Application using LINQ[^]
I edited the article to try and fix the formatting, but it didn't make a difference, I noticed that it had added me as an author, which I didn't expect to happen???
I tried to rollback to Version 16 hoping to remove me from the article, but this didn't do anything either.
Cheers,
|
|
|
|
|
Done
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
I've fixed the issue that caused this.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
I did notice I could post an alternative article though. Seems a bit much for simply telling someone their article needs a bit of work, images are missing etc.
I believe there used to be a "Add comment" button at the bottom of a pending article/blog/tip.
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
We are now working on fixing this.
Thanks on reporting.
Stay tuned
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|