Why to use Cookies ?

why to use Cookies ?

Hi,
That doesn't really help. The term Cookie can mean a number of things both in programming terms and in real life. I'm going to guess that you are referring to connecting to SAP Business One where the connection details are passed from the UI API to the DI API by means of an encrypted string. SAP refer to this string as a cookie in the SDK documentation. If this is the cookie that you are asking about then it is only used to pass the connection details from the UI API to the DI API when you are connecting an add-on. This is referred to as the single sign-on method. This is the only time that you need to use this cookie. Search the SDK documentation for Single Sign-On for more details.
Kind Regards,
Owen

Similar Messages

  • Using cookies and JavaScript to create a page to page timer.

    I have long wanted to be able to measure the time it takes to get from one page to another.  While reading in my JavaScript reference the other day, I came across cookies.  I've long known about cookies but have never used them.  The thing that looked attractive was that you can access cookies from both JavaScript and CF.
    So I put together the procedures to store the "start time" (startTimeP8D) for the transition and activated it on the onUnload event of a 1stpage.  After a few rewrites I got it working.   Here is the JavaScript to do that: it consists of two functions: doTimer which is the input section and setCookie, which writes to the cookie.  Not the two numbered alert statements.
    doTimer - results for "start" from the doTimer function called from page 1 when it unloads. (See doTimer below)
         Please note that the two startTime8D values are the same immediately after they are stored.
    On the 2nd page in the sequence, I run the corresponding code to determine the "end time", compute the delta and write it out to the page.  It didn't all run on the first try, but it now seems to be running without a crash, which can be misleading.
          second set of outputs from page 2:    
         Please not that while the endTimeP8D match, the startTimeP8D value no longer matches the previously stored value. 
    There is one major hitch in the get along which has me stymied:  As you can see, when you compare the startTimeP8 in the setCookie – results above and the "startTimeP8" in the doTimer results below the startTimeP8 is not the value that I wrote to the cookie @ unload of page 1.  I have checked and checked and do now see anywhere that the startTimeP8D value is being overwritten.  Based upon my limited experience with JavaScript cookies, it seems to me that you get an entry for each time you set the cookie.  So I would expect to see to startTimeP8D entry for each setCookie event, not a different value.
         The result of the failed computation is shown on the bottom of the page.  As you can see, the Total Elapsed Time is negative, which is never a good sign.  The other time shown, Page build time, is the run time from the server.  The whole purpose is to be able to show folks that the reason the code might be show is because of their overloaded network and not our code.  We had one client whose had users running on 56k modems.  It was so slow their VPN software was timing out!!!  Still the had the never to blame us!!!
    I am using SQLServer 2005, CF8, IE8 on W7. 
    I'm not married to this way of doing this so if anyone has a better/easier way of doing a "page to page timer", I'm up for it.  I'd prefer to fix this one since I've been working on it for the past 3 days.
    Thanks in advcance for your help.
    Len, PHRED SE

    Here it is with no JQuery or console logging calls using cookie utility functions found here:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
         <title>Test JavaScript Page Load Timer</title>
         <script>
              window.onload = function(){
                   var previousPageUnload = getCookie('unloadTime');
                   if(previousPageUnload){
                        var d = new Date();
                        var loadTime = d.getTime() - previousPageUnload;
                        alert(loadTime + 'ms');
              window.onunload = function(){
                   var d = new Date();
                     setCookie('unloadTime',d.getTime());
              function setCookie(c_name,value,expiredays) {
                   var exdate=new Date();
                   exdate.setDate(exdate.getDate()+expiredays);
                   document.cookie=c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
              function getCookie(c_name) {
                   if (document.cookie.length>0) {
                     c_start=document.cookie.indexOf(c_name + "=");
                     if (c_start!=-1)
                       c_start=c_start + c_name.length+1;
                       c_end=document.cookie.indexOf(";",c_start);
                       if (c_end==-1) c_end=document.cookie.length;
                       return unescape(document.cookie.substring(c_start,c_end));
                   return null;
         </script>
    </head>
    <body>
         <h1>Test JavaScript Page Load Timer</h1>
    </body>
    </html>
    Note that overwriting global window events like this is not a good idea, which is why I used JQuery in my earlier example. I strongly suggest you look at JQuery or one of the other JS libraries (YUI, etc.) to help with event handling. I'll leave it at that as this is getting into JavaScript development, not really on topic for a ColdFusion forum.

  • Why when using Adobe Bridge,  I apply a star rating,  the rating does not show up in Photoshop Elements? [tags]

    Why when using Adobe Bridge,  I apply a star rating,   the rating does not show up in Photoshop Elements.  I use Elements as my organizer and Bridge to view as it is much more user friendly.  Anyone any solutions??

    Most likely you have set the wrong file as the external editor. You don't want the obvious one; that's just a link to the welcome screen. Go back and choose this one, which is hidden away inside the folder Support Files:

  • How do I use cookies to control which part of the timeline to play from?

    Hi there,
    I have created an animation with Adobe Edge. My site uses Concrete5 and I am pulling in the Edge content into an IFRAME on my home page (there my be a better way to do this and I'm open to suggestions). I want the animation to play from the start when someone first visits the site, but if during their browser session they navigate back to the home page, I want the animation to only play a shorter segment of frames near the end.
    My question is, how do I use cookies to acheive this? I'm new to javascript/jquery.
    I've included the following code on compositionReady, (found in another post on this forum) but don't have a clue how to continue...
    // insert code to be run when the composition is fully loaded here yepnope(   {     nope:[       '/js/jquery.cookie.js'     ],   complete: init   } ); function init() { //create your cookie's initial values here } 
    My temp site is here - http://79.170.40.43/nutcrackerdesign.co.uk/
    On revisting the homepage, I only want to play from when the green 'How can we help?' button drops in.
    Many thanks!
    Russ

    Hi, Russ-
    I found this article, which seemed really helpful in describing how cookies work in JavaScript:
    http://www.quirksmode.org/js/cookies.html
    Remember that JS works just fine within Animate, so on your compositionReady, you can read your cookie and then set the play based on that.  You should probably uncheck the autoplay for your Stage and control the play of your Stage from the compositionReady.
    Good luck!
    -Elaine

  • I want to ask something about firefox. why firefox use very much memory? can you develop to reduce memory comsume? this problem is very distrub in my PC with low memory.

    I want to ask something about firefox.
    why firefox use very much memory?
    can you develop to reduce memory comsume?
    this problem is very distrub in my PC with low memory.
    == This happened ==
    Every time Firefox opened

    How much memory is Firefox using right now?
    # Press '''CTRL+SHIFT+ESC''' to load the Task Manager window
    # Click the Processes tab at the top. (Click once near the top of the window if you don't see tab
    # Find firefox.exe, and see how many kilobytes of memory it's using.
    Showing around 80MB when Firefox first starts is normal. Right now, I have 75 tabs open and it's using 500MB - this varies a lot depending on what you have in the tabs.
    Other than high memory usage, what other problems are you experiencing? (Examples include slowness, high CPU usage, and failure to load certain sites)
    Many of these issues, including high memory usage, can be caused by misbehaving add-ons. To see if this is the case, try the steps at [[Troubleshooting extensions and themes]]. Outdated plugins are another cause of this issue - you can check for this at http://www.mozilla.com/plugincheck

  • Why we use different clearing account for GR/IR and planned cost clearing a

    My client ask for using same account for GR/IR account and all planned cost clearing account.
    i try to convince it should be different accounts but he needs a logical answer.
    Why we use different clearing account for GR/IR and planned cost clearing accounts?

    Dear friend.
    u just tell him while doing GR it will debited n  while doing IR it should get credited.hence we  need to take diff G/L account or same account.
    regds
    nasir

  • HT201343 My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found

    My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found. So cannot use mirroring.
    I have follow trouble shooting , they recommend to go system preference -> display , thus can find out the mirroring icon if no mean it doesnt support. But according to the web, Early 2011 MBP should be able to use, dunno why.

    Just realise I havent updated my OS to mountain lion and this is the reason why I cannot use mirroring before ^^
    Thanks all

  • What is the intelligent calc? Why we use that?

    If u loads data to parent level where data will be stored?
    What r the unary operators?
         How do u decide dense & Sparse?
         What is the header? Why we use header in the rule file?
    Please give me reply dont say read dabg
    Thank u.......

    OK,
    You have a database/application.
    1. You might have had run the calculation( ie calc script).
    2. after that , you might have loaded the data ,i.e you have infused new data and new data blocks.
    3. For these new data blocks ,you have not run the calculation so far
    4. so, now the intelligent calculation come into picture, with the help of the intelligent calculation concept, we can run the calculation on only the new data loaded or on only new data blocks,which you loaded
    Hope this helps you in understanding the intellligence calculation in short.
    One can enable and disable at his comfort ,and for that please refer to the following commands
    SET UPDATECALC
    SET CLEARUPDATESTATUS
    this is to answer you intelligent calc.
    1. when you load data into the parent level , it ll be stored at the parent level only.
    2. when you go to "Dimension"' tab of the database properties, you can get which one is dense or sparse
    3. in general ,you have a datafile ,and the upper most line is the one ,which has headers,so manipulate the same ,you use headers in the rule file.
    I have not told you to refer DBAG , :)
    But, you got to read DBAG or pick a bootcamp for you to understand further .
    Sandeep Reddy Enti
    HCC

  • Why to use B2B when we can go with ...

    why to use B2B when we can go with A2A with FTP services running in the source and target systems.
    why do we go for parties if the above one is possible.
    plz help out im into loads of confusion

    Hi
    A2A is application to application: when two applications in a company talk to each other we call it an A2A scenario and if its across Companies we call it B2B or buisness to buisness scenarios.
    All the following links will explain   the difference between A2A and B2B
    With scenario’s
    A2A   B2B Scenarios
    can anyone explain A2A & B2B  AND  BPM & ccBPM  with an example..
    Help for Scenario! B2B or A2A
    A2A Vs B2B
    A2A and B2B
    I hope this will answer your question
    regards
    --- prasad

  • Why we use Cluster Tables in SAP Hr

    hai friends, i am new to  ABAP-HR and SAP HR, Actually i am core abaper ( working on SD, MM and Fi Modules ) , can any one explain me why and what is the use of Cluster tables in SAP HR, why we use in SAP HR function Module ?
    Thnx in advance
    Vijaya

    Hi Vijaya,
    This may help for ur question..
    Why cluster table:
    Cluster tables combine the data from several tables with identical (or almost identical) keys into one physical record on the database.
    Data is written to a database in compressed form.
    Retrieval of data is very fast if the primary key is known.
    Cluster tables are defined in the data dictionary as transparent tables.
    External programs can NOT interpret the data in a cluster table.
    Special language elements EXPORT TO DATABASE, IMPORT TO DATABASE and DELETE  FROM DATABASE are used to process data in the cluster tables.
    PCL1 - Database for HR work area; (long text, etc)
    PCL2 - Accounting Results (time, travel expense and payroll); (payroll results)
    PCL3 - Applicant tracking data;
    PCL4 - Documents, Payroll year-end Tax data (change logs, etc)

  • . Why we use Sync-Async bridge? .

    Why we use Sync-Async bridge?

    Dear Manoj,
    http://help.sap.com/saphelp_nw04/helpdata/en/55/c5633c3a892251e10000000a114084/content.htm
    A distinction is made between synchronous and asynchronous communication for both imported interfaces and message interfaces.  You define the mode of communication when you define an interface:
    ·        In the case of synchronous communication, a response message is expected from the receiver after a request has been sent. Once the request message has been sent, no further messages can be sent until the response to the request has arrived back at the sender system.
    ·        However, in asynchronous communication a (immediate) response is not expected. A sending process can send multiple messages to a receiver in a bundle and then continue executing the process.
    You would use Synch - Asynch Bridge to enable the communication between a synchronously calling business system (synchronous outbound interface) and an asynchronously called business system (asynchronous inbound and outbound interface), you can define a sync/async bridge in an integration process. You can only define one sync/async bridge for each integration process.
    Regards,
    Naveen.

  • Why to use Interface if methods are not implemented??

    Hello,
    I am having a problem to clearify as, why to use the interfaces which defines only methods and no implementation??
    When a class implements an interface the methods are implemented by the class itself, don't you think that the same functionality can be achieved if the class defined the method itself...
    The why to use interfaces, just that the same method name can be used by many classes or some other reasons..

    did you google on that? There is lots of information I am sure explaining why you code to an interface defined type rather than a class defined type.
    However, fundamentally you are correct, classes define their own type. The idea is that you use an interface because it allows you to have more than one implementation. Plus you can more easily change the structure of your program if you later wish if you did not use the class type directly.
    You get better answers if you ask in the Patterns forum below.

  • HT5312 why icant use my apple ID?

    why icant useing my apple id?

    What happens when you try to use it, does the 'buy' button not work on items, do you get any error messages ... ?
    If you are getting a message to contact iTunes support then you can do so via this page and ask them why the message is appearing (these are mainly user-to-user forums, we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
    If it's a different problem ... ?

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • Why OSPF use wildcard mask? Not subnet mask?

    Why OSPF use wildcard mask? Not subnet mask? Any advantage of using wildcard in OSPF? How wildcard in OSPF work? I saw some OSPF configuration for class b network use 0.0.0.255 as an OSPF wildcard mask. What does it mean? Is that mean to exchange only route information for the subnetwork?

    hello,
    with the use of a wild-card mask we can gain control over route update propagation.So we can define which networks should receive updates and which networks should not receive routing updates.Its just like wildcard masks used in ACLs.this is my view
    cheers,

Maybe you are looking for

  • How to Check the report is Finished while calling a report from Forms 6i

    Dear All, I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" I need to copy the pdf to store it in another place once the report is generat

  • Windows 8 Will not read a disc.

    I have windows 8 running smoothly on my imac (2012), everything is working perfectly, but it won't read discs. Also windows will not eject discs.

  • Placing images into a multistate object

    Hey folks, Trying to figure out what's going on here. Thanks to some helpful folks here, I'm making inroads with JS programming, but I'm still hitting some bumps in the road. I've got a handful of graphics that I'm importing, and now I want to to tur

  • Add node at particular location in XML file

    I'd like to add an item to a particular location in an XML file.  Location of parent node is given by string variable "itemtoaddto" and the XML file is given by "myXML": function TraverseXMLfile(itemtoaddto,myXML): void {     var AttributeList:XMLLis

  • I have two iCloud accts each to manage different data

    Hello, The reasoning is now in my alt iCloud account I can have my Contacts, Calendars, and Reminders without my wife and kids stuff merging with mine. Anyway - it seems to be working fine but am wondering if when my phone backs up are both accts bac