-
Notifications
You must be signed in to change notification settings - Fork 5
Add search functionality #13
base: master
Are you sure you want to change the base?
Conversation
$(this).attr('action', "/search/" + query); | ||
}); | ||
}); | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using JS here? We should probably just use GET method if we want it to make a nice history entry for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy pasta code from simple multi. Idk what you mean about a history entry, please elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Three options I suppose
- Use POST. This means that going backward then forward usually prompts for form resubmission. We don't really want that here.
- Use GET. No prompt when going through history. It also will cause google and the like to not index/cache these pages I believe.
- Use canoncial URLs. This is probably not what we want here since google will index and cache the page.
Just switch method to GET and toss the JS I think.
This is good work. Other things that I would like to be able to search for:
Should I open a ticket, or do you think you could handle adding those? It should basically be running a query on block height that strips everything but numeric values, and stipping the version number and public checksum from a decoded base58 address. |
best to open a ticket either way ;) |
To clarify I'm asking if you want to amend this commit now, or defer to later. Also, worth mentioning that it should also just direct you to the appropriate page if there's only one result. |
I think its 'ok' as-is, and most importantly, it is functional. I'm in favor of merging & opening a ticket for the improvements. |
Search will now find transactions or blocks if given the hash. From @ericecook