Pagedemos was start by long-time StackOverflow users who needed a permanent place to provide off-site links for code demonstration. With a generous initial investment, we've arranged hosting for several years (until 2018 as of Aug 2015). The nominal fees for optional demo feature upgrades are used to extend this horizon into the future. After hosting, legal, and administration costs, all proceeds are re-invensted towards hosting with the goal of creating a permanent place for code.
Aside from lasting forever, we've worked hard to put the features you want in an online editor into pagedemos. We love interface flexibility and customization, open API access, and fast-loading applications.
Got any suggestions? We would love to hear from you! Thanks for checking us out, and enjoy.
Features
-
{{#tips}}
Frequently Asked Questions (FAQ) (back to top)
-
Is it free?
Yes, because we want everyone to be able to use it. Some services which incur us expenses are assessed a small per-demo fee, but they are all optional. Aside from that, everything here is free and licensed for any use, including the API.
-
Do I need an account?
No, we don't offer user accounts or charge monthly fees to provide premium features, demos are free and can be upgraded ad-hoc. If you upgrade a particular demo with special features, it's applied forever, with no further costs. This avoids typical account headaches like forgotten passwords, privacy concerns, security questions, billing mishaps, etc...
-
Who can see my demos?
The only way anyone can get to your demo is by following a link your created because we don't publish or list anyone's demos, and the urls are un-guessable. In short, demos are all private by default, putting you in control of all your demos; stunning and embarrassing alike.
-
How long do the pagedemos I create last?
Forever. Please consider purchasing a few premium feature upgrades like vanity URLs or HTTPS access to support our continued hosting.
-
How do I use my desktop editor (vim/notepad/etc) to edit a pagedemo?
Go to Tools > Upload, and choose a file you're already editing in yor desktop editor. Make and save a change in your editor, and the pagedemo will update. For best results, make sure the "Update on Code Change" is checked in Tools > Settings > Preview, and that "Watch Uploaded Files" is checked in Tools > Settings > Devices
-
How can I preview on many devices at once without refreshing each one?
You need to setup multi-device editing. Your editing box will become the pusher and your remote viewing devices are listeners. Go to Tools > Settings > Devices on each device. For the editing box, choose to push updates on revision commits, or mere runs. For the remote view devices, check the "Listen for changes..." option, and use the view mode toggle in the bottom-right corner of the screen to show output only. Now make an edit and watch the remote previews update themselves.
Keyboard Shortcuts (back to top)
-
ScrollLock
Toggle View -
F8
Format Menu -
F9
Toggle View -
F4
Run -
Pause
Menu Toggle -
Esc
Close Menu -
Ctrl
+Space
Suggest Completion -
Ctrl
+/
Toggle Code Comment -
Ctrl
+Enter
Run -
Ctrl
+s
Save (Share) -
Ctrl
+Shift
+s
Fork (Clone) -
Ctrl
+Shift
+Del
Clear -
Ctrl
+Shift
+L
Format Menu -
Ctrl
+1
Editor-Only View -
Ctrl
+2
Preview-Only View -
Ctrl
+3
Dual-Pane View (default)
API (back to top)
The client-side JavaScript API
provides a simple tools to load, save, and find your pagedemos using a promise-based interface.
You can also use these same commands though HTTP requests, action at http://pagedemos.com/api/
The HTTP API uses the param names as noted below, with the command being passed as cmd, ex: /API/?cmd=exists&id=1234567890AB
Content should be submitted as a POST variable value using a application/x-www-form-urlencoded form request type.
Also note that all API commands that only need an ID can be accessed via a path short-cut without a query: /API/METHOD/PAGEDEMO_ID/
Commands
- API.comment (id, value, name) ->Boolean
leaves a comment on a pagedemo
- API.comments (id) ->Array Example
fetches an array of comments from a pagedemo
- API.dir (id) ->Array Example
fetches a list of attached resources to a pagedemo
- API.fetch (id, title) ->String Example
fetches the source of an attached css or js resource
- API.get (id) ->String Example
fetches the latest single revision of a pagedemo
- API.include (id, title) ->void Example
injects an attached resource into an HTML document using link/script tags
- API.exists (id) ->Boolean Example
determines if a pagedemo ID is in-use (true/false)
- API.archived (id) ->Boolean Example
determines if a missing pagedemo has been moved to a deep offline archive
- API.list (id, type) ->Array Example 1 Example 2
fetches a list of events from the log, either all or all of a certain kind
- API.pull (id) ->Array Example
fetch an array of all revisions of a pagedemo
- API.resource (id, value, title) ->Boolean
file a CSS or JS resource under a pagedemo and by a file title. POST.
- API.save (id, value, title) ->Boolean
saves a revision of a pagedemo with an optional title. POST.
- API.search (id, term) ->Array Example
fetches an array of revisions but filters out those not matching a term
URL Endpoints
In additions to the API, each pagedemo provides several url-named sub-views, not just the in-editor shareable URL. These views lets you share and embed, monitor and analyze, and mix parts of your demo with others via resource urls for CSS and JS.
- embed /pagedemo_id/embed/
(? opt mode[preview|code], opt update[true|false], opt css[url]) -> HTML
perms: CORS
FRAME
View code and output without editor, ideal for framing on other sites. Example
- rss /pagedemo_id/rss/
-> XML
perms: CORS
FRAME
View the revision log as an RSS feed for IFTTT and mobile integration. Example
- oembed /oembed/?url=http%3A%2F%2Fpagedemos.com%2Fpagedemo_id%2F2&format=json
(url) -> JSON
perms: CORS
FRAME
Meta data about the demo and pagedemos.com for better social sharing and extension discovery. Live Example
- output /pagedemo_id/output/
-> HTML
perms: CORS
FRAME
View just the preview pane output without editor. Example
- log /pagedemo_id/log/
-> TEXT
perms: CORS
FRAME
View a demo's activity log as a TSV spreadsheet of views, edits, and comments. Example
- raw /pagedemo_id/raw/
-> TEXT
perms: CORS
FRAME
Same as output view, but allowed for framing and AJAX, and served as raw text. Example
- resource /pagedemo_id/filename.ext
-> JAVASCRIPT/CSS/IMG/TXT
perms: CORS
FRAME
View the content of a file resource attached to a demo. Example
- include /pagedemo_id/include/
-> JAVASCRIPT
perms: CORS
FRAME
Include one demo into another to load <head>-defined external css+js packages and all <body> content with one script tag. To reduce flicker, place in head tag, while for best perfomance, place just below the end of the body tag, whatever works better. Example
- js /pagedemo_id/js/
-> JAVASCRIPT
perms: CORS
FRAME
Collects the content of any inline-content <script> tags. Example
- css /pagedemo_id/css/
-> CSS
perms: CORS
FRAME
Collects the content of any inline-content <style> tags. Example
- html /pagedemo_id/html/
-> HTML
perms: CORS
FRAME
The contents of a demo's body, without inline-content <style> or <script> tags. Example
Sharing
Resources
Contact (back to top)
Terms Of Service / Legal Mumbo Jumbo (back to top)
Plain terms of service are as follows, see our official TOS for the actual snooze-fest. We want everyone to be able to enjoy this service, except for evil-doers. Don't do evil and you should be fine (at least with us).
- Usage
- We don't use your work to promote ourselves nor share your work with others; that's your job.
- Content
- We don't permit pagedemos to be used for illegal or evil content or activities such as pornography, bullying, scamming, phishing, hacking, deeplinking, click-jacking, un-desired hardware probing, hate speech, and posting copyrighted materials or malicious code.
- Privacy
- We don't store any user-identifiable data, just the content you create. We don't list or promote demos and won't reveal the URLs of your demos to other users. We don't run ads or share personal info with anyone, including analytics.
- License
- All data belongs to the author and no licenses are enforced by us. pagedemos is not responsible or liable for any losses/damages/liabilities resulting from using the site/service/products.
- Payment
- Demos may be upgraded with special features for a nominal charge. Such charges are handled by PayPal, and represent single transactions. We don't bill, have recurring charges, or store personal info resulting from these transactions. As such, we are limited in our power to issue refunds for any purchase, though we can give you credit for another corrective transaction.
- Liability
- We don't take any. We aren't responsible for lost or stolen content nor damages resulting from such events. Life is not without risk, but we do and will keep doing our best to keep the site up and running, hopefully forever.
- Abuse
- The needs of the many out-weigh the needs of the few. We are not free mass storage or a zombie botnet backbone, don't pretend like we are. Demo's whose storage or bandwidth consistently exceeds multiples of the median are subject to removal to preserve our resources for the majority of users. In practice, you don't need to worry about this if your using pagedemos the intended/obvious way.
- Enforcement
- Whenever possible we will use automated tools to enforce these terms while respecting your privacy. Enforcement action will not come with advance notice because we don't even know how to contact you.
- Bummer / C.Y.A.
- These terms are not negotiable. No warranty/guarantee/liability is offered or implied. All sales final. State-based exceptions apply. We comply with legally-compelling requests by law enforcement agencies within the United States of America. See the official pagesdemos TOS for full details.
Privacy Policy (back to top)
This privacy policy has been compiled to better serve those who are concerned with how their 'Personally identifiable information' (PII) is being used online. PII, as used in US privacy law and information security, is information that can be used on its own or with other information to identify, contact, or locate a single person, or to identify an individual in context.Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in accordance with our website.